Class EulerIntegrator#
Defined in File Integrator.h
Inheritance Relationships#
Base Type#
public Karana::Integrators::Integrator(Class Integrator)
Class Documentation#
-
class EulerIntegrator : public Karana::Integrators::Integrator#
The fixed-step Euler one step integrator.
Public Functions
-
EulerIntegrator(size_t num_states, size_t num_q_states, DerivativeFunction f, const IntegratorOptions *options = nullptr)#
Constructor.
- Parameters:
num_states – The number of states to integrate.
num_q_states – Number of leading Q states; zero means no partition is specified.
f – The derivative function to calculate the derivative of the states.
options – The integrator options.
-
virtual void hardReset(size_t num_states, size_t num_q_states) override#
Replace the state size and Q partition count.
- Parameters:
num_states – the new state size
num_q_states – Number of leading Q states; zero means no partition is specified.
-
virtual km::Ktime advanceTo(const km::Ktime &t_end) override#
Method to advance the system state to a specified time.
- Parameters:
to_t – the desired end time
- Returns:
the actual end time
Public Static Functions
-
static kc::ks_ptr<EulerIntegrator> create(size_t num_states, size_t num_q_states, DerivativeFunction deriv_fn, const Integrator::IntegratorOptions *options = nullptr)#
Factory method for creating EulerIntegrator instances.
- Parameters:
num_states – the length of the states vector
num_q_states – Number of leading Q states; zero means no partition is specified.
deriv_fn – the derivative function
options – options for the integrator
- Returns:
a new forward Euler Integrator instance
-
EulerIntegrator(size_t num_states, size_t num_q_states, DerivativeFunction f, const IntegratorOptions *options = nullptr)#