pub trait FunctionArguments: Into<Vec<f64>> + Clone + TryFrom<Vec<f64>> { }
Expand description

Euler’s method for ordinary differential equations. The form of the equation is assumed to be “y’(n) = f(t,y,y’,..,y’(n-1))”.

Parameters

  • initial_val: Vec The previous values of every variable. The derivatives go in descending order: [y’(n),y’(n-1),…,t]
  • step: f32 The step used to calculate the approximation.
  • f: T where T: Fn(Vec) -> f32 Reffers to the function on the left side of the above equation.

Returns

  • Vec A vector of values corresponding to the new approximation. The derivatives are delivered as in ‘initial_val’

Implementations on Foreign Types§

Implementors§