Class max_step_checker

| Home | Libraries | People | FAQ | More

## Class max_step_checker

boost::numeric::odeint::max_step_checker — A class for performing overflow checks on the step count in integrate functions.

## Synopsis

    // In header: <boost/numeric/odeint/integrate/max_step_checker.hpp>

    class max_step_checker {
    public:
      // construct/copy/destruct
      max_step_checker(const int = 500);

      // public member functions
      void reset();
      void operator()(void);
    };

## Description

Provide an instance of this class to integrate functions if you want to throw a runtime error if too many steps are performed without progress during the integrate routine.

### `max_step_checker` public construct/copy/destruct

1.     max_step_checker(const int max_steps = 500);

   Construct the `max_step_checker`. max_steps is the maximal number of iterations allowed before runtime_error is thrown.

### `max_step_checker` public member functions

1.     void reset();

   Resets the `max_step_checker` by setting the internal counter to 0.

2.     void operator()(void);

   Increases the counter and performs the iteration check.