pub struct NeuralOdeSolver {
pub func: NeuralOdeFunc,
pub rtol: f64,
pub atol: f64,
}Expand description
Integrates a NeuralOdeFunc from t0 to t1 using fixed-step RK4 or
adaptive DOPRI5.
Fields§
§func: NeuralOdeFuncThe parameterised ODE dynamics.
rtol: f64Relative tolerance for adaptive step control.
atol: f64Absolute tolerance for adaptive step control.
Implementations§
Source§impl NeuralOdeSolver
impl NeuralOdeSolver
Sourcepub fn new(func: NeuralOdeFunc, rtol: f64, atol: f64) -> Self
pub fn new(func: NeuralOdeFunc, rtol: f64, atol: f64) -> Self
Create a new solver wrapping func with the given tolerances.
Sourcepub fn solve_rk4(&self, z0: &[f64], t0: f64, t1: f64, dt: f64) -> Vec<f64>
pub fn solve_rk4(&self, z0: &[f64], t0: f64, t1: f64, dt: f64) -> Vec<f64>
Solve from z0 at t0 to t1 using fixed-step RK4 with step size dt.
Returns the final state at t1.
Trait Implementations§
Source§impl Clone for NeuralOdeSolver
impl Clone for NeuralOdeSolver
Source§fn clone(&self) -> NeuralOdeSolver
fn clone(&self) -> NeuralOdeSolver
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NeuralOdeSolver
impl RefUnwindSafe for NeuralOdeSolver
impl Send for NeuralOdeSolver
impl Sync for NeuralOdeSolver
impl Unpin for NeuralOdeSolver
impl UnsafeUnpin for NeuralOdeSolver
impl UnwindSafe for NeuralOdeSolver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.