Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/numeric/odeint/integrate/observer_collection.hpp @ 125:34e428693f5d vext
Vext -> Repoint
author | Chris Cannam |
---|---|
date | Thu, 14 Jun 2018 11:15:39 +0100 |
parents | c530137014c0 |
children |
rev | line source |
---|---|
Chris@16 | 1 /* |
Chris@16 | 2 [auto_generated] |
Chris@16 | 3 boost/numeric/odeint/integrate/observer_collection.hpp |
Chris@16 | 4 |
Chris@16 | 5 [begin_description] |
Chris@16 | 6 Collection of observers, which are all called during the evolution of the ODE. |
Chris@16 | 7 [end_description] |
Chris@16 | 8 |
Chris@101 | 9 Copyright 2011-2012 Karsten Ahnert |
Chris@101 | 10 Copyright 2011-2012 Mario Mulansky |
Chris@16 | 11 |
Chris@16 | 12 Distributed under the Boost Software License, Version 1.0. |
Chris@16 | 13 (See accompanying file LICENSE_1_0.txt or |
Chris@16 | 14 copy at http://www.boost.org/LICENSE_1_0.txt) |
Chris@16 | 15 */ |
Chris@16 | 16 |
Chris@16 | 17 |
Chris@16 | 18 #ifndef BOOST_NUMERIC_ODEINT_INTEGRATE_OBSERVER_COLLECTION_HPP_INCLUDED |
Chris@16 | 19 #define BOOST_NUMERIC_ODEINT_INTEGRATE_OBSERVER_COLLECTION_HPP_INCLUDED |
Chris@16 | 20 |
Chris@16 | 21 #include <vector> |
Chris@16 | 22 |
Chris@16 | 23 #include <boost/function.hpp> |
Chris@16 | 24 |
Chris@16 | 25 namespace boost { |
Chris@16 | 26 namespace numeric { |
Chris@16 | 27 namespace odeint { |
Chris@16 | 28 |
Chris@16 | 29 template< class State , class Time > |
Chris@16 | 30 class observer_collection |
Chris@16 | 31 { |
Chris@16 | 32 public: |
Chris@16 | 33 |
Chris@16 | 34 typedef boost::function< void( const State& , const Time& ) > observer_type; |
Chris@16 | 35 typedef std::vector< observer_type > collection_type; |
Chris@16 | 36 |
Chris@16 | 37 void operator()( const State& x , Time t ) |
Chris@16 | 38 { |
Chris@16 | 39 for( size_t i=0 ; i<m_observers.size() ; ++i ) |
Chris@16 | 40 m_observers[i]( x , t ); |
Chris@16 | 41 } |
Chris@16 | 42 |
Chris@16 | 43 collection_type& observers( void ) { return m_observers; } |
Chris@16 | 44 const collection_type& observers( void ) const { return m_observers; } |
Chris@16 | 45 |
Chris@16 | 46 private: |
Chris@16 | 47 |
Chris@16 | 48 collection_type m_observers; |
Chris@16 | 49 }; |
Chris@16 | 50 |
Chris@16 | 51 } // namespace odeint |
Chris@16 | 52 } // namespace numeric |
Chris@16 | 53 } // namespace boost |
Chris@16 | 54 |
Chris@16 | 55 |
Chris@16 | 56 #endif // BOOST_NUMERIC_ODEINT_INTEGRATE_OBSERVER_COLLECTION_HPP_INCLUDED |