Can you provide me with a simple example of performing a numeric integration with odeint in C++
?
I would like to use the convenient integrate function, documented as:
integrate( system , x0 , t0 , t1 , dt )
Also I'm not sure, how to pass it instead of a function or a functor, a class method, if that's possible.
In C++11 you can use a simple lambda function wrapping the call to your member method
std::bind
might also work, but then you have to take care if values are passed by reference of by value.In C++03 you need to write a simple wrapper around your class method
(Boost.Bind will not work correctly with more then two arguments).