Closed mihersch closed 7 years ago
Hi,
I think your use case could be easily implemented with a custom range adapter which decorates the adaptive range (or any other range):
auto r = make_adaptive_range(stepper,system, x ,t_start, t_end, dt );
// maybe find a better name for observable range?
auto r2 = make_observable_range( r , obs );
auto iter = boost::find_if( r2 , stop );
I think such a range should be part of a range framework, like Boost.Range or range-v3. Maybe it is worth to ask if it should be included there.
Hi,
Thanks for your answer (and for odeint!). I think I see what you mean but isn't the observer an odeint concept? Anyway, I don't think I can now dig into the range code and concepts.
Best
Hello,
I adapted odeint to enable the inclusion of an observer to the make_adaptive_range construct, so that it can be called as
auto iter= boost::find_if(make_adaptive_range(stepper,system, x ,t_start, t_end, dt, obs), stop);
whereobs
in an observer.Is it worth sharing my code and if so, how should I do it?
Thanks!