std::pair< time_type , time_type > do_step( System system )
    {
        const size_t max_count = 1000;

        if( !m_is_deriv_initialized )
        {
            typename odeint::unwrap_reference< System >::type &sys = system;
            sys( get_current_state() , get_current_deriv() , m_t );
            m_is_deriv_initialized = true;
        }

        controlled_step_result res = fail;
        m_t_old = m_t;
        size_t count = 0;
        do
        {
            res = m_stepper.try_step( system , get_current_state() , get_current_deriv() , m_t ,
                                      get_old_state() , get_old_deriv() , m_dt );
            if( count++ == max_count )
                throw std::overflow_error( "dense_output_controlled_explicit : too much iterations!");
        }
        while( res == fail );
        toggle_current_state();
        return std::make_pair( m_t_old , m_t );
    }
 std::pair< time_type , time_type > do_step( System system )
 {
     m_stepper.do_step( system , get_current_state() , m_t , get_old_state() , m_dt );
     m_t_old = m_t;
     m_t += m_dt;
     toggle_current_state();
     return std::make_pair( m_t_old , m_dt );
 }
 std::pair< time_type , time_type > do_step( System system )
 {
     failed_step_checker fail_checker;  // to throw a runtime_error if step size adjustment fails
     controlled_step_result res = fail;
     m_t_old = m_t;
     do
     {
         res = m_stepper.try_step( system , get_current_state() , m_t , get_old_state() , m_dt );
         fail_checker();  // check for overflow of failed steps
     }
     while( res == fail );
     m_stepper.stepper().prepare_dense_output();
     this->toggle_current_state();
     return std::make_pair( m_t_old , m_t );
 }
    std::pair< time_type , time_type > do_step( System system )
    {
        const size_t max_count = 1000;

        controlled_step_result res = fail;
        m_t_old = m_t;
        size_t count = 0;
        do
        {
            res = m_stepper.try_step( system , get_current_state() , m_t , get_old_state() , m_dt );
            if( count++ == max_count )
                throw std::overflow_error( "rosenbrock4 : too much iterations!");
        }
        while( res == fail );
        m_stepper.stepper().prepare_dense_output();
        this->toggle_current_state();
        return std::make_pair( m_t_old , m_t );
    }
 void calc_state( time_type t , StateOut &x )
 {
     m_stepper.stepper().calc_state( t , x , get_old_state() , m_t_old , get_current_state() , m_t );
 }
 const state_type& previous_state( void ) const
 {
     return get_old_state();
 }
 void calc_state( time_type t , const StateOut &x ) const
 {
     m_stepper.stepper().calc_state( t , x , get_old_state() , get_old_deriv() , m_t_old ,
                                     get_current_state() , get_current_deriv() , m_t );
 }
 void calc_state( time_type t , const StateOut &x ) const
 {
     m_stepper.calc_state( x , t , get_old_state() , m_t_old , get_current_state() , m_t );
 }