3 boost/numeric/odeint/integrate/detail/functors.hpp
6 some functors for the iterator based integrate routines
9 Copyright 2009-2013 Karsten Ahnert
10 Copyright 2009-2013 Mario Mulansky
12 Distributed under the Boost Software License, Version 1.0.
13 (See accompanying file LICENSE_1_0.txt or
14 copy at http://www.boost.org/LICENSE_1_0.txt)
18 #ifndef BOOST_NUMERIC_ODEINT_INTEGRATE_DETAIL_FUNCTORS_HPP_INCLUDED
19 #define BOOST_NUMERIC_ODEINT_INTEGRATE_DETAIL_FUNCTORS_HPP_INCLUDED
29 template< class Observer >
35 obs_caller( size_t &m , Observer &obs ) : m_n(m) , m_obs( obs ) {}
37 template< class State , class Time >
38 void operator()( std::pair< const State & , const Time & > x )
40 typedef typename odeint::unwrap_reference< Observer >::type observer_type;
41 observer_type &obs = m_obs;
42 obs( x.first , x.second );
47 template< class Observer , class Time >
48 struct obs_caller_time {
53 obs_caller_time( Time &t , Observer &obs ) : m_t(t) , m_obs( obs ) {}
55 template< class State >
56 void operator()( std::pair< const State & , const Time & > x )
58 typedef typename odeint::unwrap_reference< Observer >::type observer_type;
59 observer_type &obs = m_obs;
60 obs( x.first , x.second );
67 } // namespace numeric
70 #endif // BOOST_NUMERIC_ODEINT_INTEGRATE_DETAIL_FUNCTORS_HPP_INCLUDED