Class xlifepp::EulerT#

template<class T>
class EulerT : public xlifepp::OdeSolverT<T>#

Euler method for solving ODEs.

This class implements the Euler method for solving ODEs of the form y’=f(t,y). The method computes the solution by iteratively updating the state y at each time step dt, using the formula: y(t+dt) = y(t) + dt * f(t,y(t)) where f(t,y(t)) is the derivative of y at time t. The compute method fills the tys_ list with pairs of (time, state) at each time step. The class also provides methods to access the computed states and times, and to save the results to a file.

Template Parameters:

T – type of the state (real_t, complex_t, Vector<real_t>, Vector<complex_t>, …)

Note

This class is not meant to be used directly, but as a base class for specific ODE solvers like Euler.