Skip to main content

ode_step_euler

Function ode_step_euler 

Source
pub fn ode_step_euler(y: &Tensor, dydt: &Tensor, h: f64) -> Tensor
Expand description

Single step of Euler’s method: y_{n+1} = y_n + h * f(t_n, y_n).

§Arguments

  • y - Current state vector (1D tensor)
  • dydt - Derivative vector at current time (1D tensor, same shape as y)
  • h - Step size

§Returns

New state vector y_{n+1}