boost::numeric::odeint::modified_midpoint
// In header: <boost/numeric/odeint/stepper/modified_midpoint.hpp> template<typename State, typename Value = double, typename Deriv = State, typename Time = Value, typename Algebra = typename algebra_dispatcher< State >::algebra_type, typename Operations = typename operations_dispatcher< State >::operations_type, typename Resizer = initially_resizer> class modified_midpoint : public explicit_stepper_base { public: // types typedef explicit_stepper_base< modified_midpoint< State, Value, Deriv, Time, Algebra, Operations, Resizer >, 2, State, Value, Deriv, Time, Algebra, Operations, Resizer > stepper_base_type; typedef stepper_base_type::state_type state_type; typedef stepper_base_type::wrapped_state_type wrapped_state_type; typedef stepper_base_type::value_type value_type; typedef stepper_base_type::deriv_type deriv_type; typedef stepper_base_type::wrapped_deriv_type wrapped_deriv_type; typedef stepper_base_type::time_type time_type; typedef stepper_base_type::algebra_type algebra_type; typedef stepper_base_type::operations_type operations_type; typedef stepper_base_type::resizer_type resizer_type; typedef stepper_base_type::stepper_type stepper_type; // construct/copy/destruct modified_midpoint(unsigned short = 2, const algebra_type & = algebra_type()); // public member functions template<typename System, typename StateIn, typename DerivIn, typename StateOut> void do_step_impl(System, const StateIn &, const DerivIn &, time_type, StateOut &, time_type); void set_steps(unsigned short); unsigned short steps(void) const; template<typename StateIn> void adjust_size(const StateIn &); // private member functions template<typename StateIn> bool resize_impl(const StateIn &); };
Implementation of the modified midpoint method with a configurable number of intermediate steps. This class is used by the Bulirsch-Stoer algorithm and is not meant for direct usage.
modified_midpoint
public member functionstemplate<typename System, typename StateIn, typename DerivIn, typename StateOut> void do_step_impl(System system, const StateIn & in, const DerivIn & dxdt, time_type t, StateOut & out, time_type dt);
void set_steps(unsigned short steps);
unsigned short steps(void) const;
template<typename StateIn> void adjust_size(const StateIn & x);