pub struct OdeSolution {
pub states: Vec<OdeState>,
}Expand description
Stored ODE trajectory with dense output via linear interpolation.
Holds all accepted integration steps and provides interpolation at arbitrary times within the integration interval.
Fields§
§states: Vec<OdeState>Ordered sequence of states (by increasing time).
Implementations§
Source§impl OdeSolution
impl OdeSolution
Sourcepub fn new(states: Vec<OdeState>) -> Self
pub fn new(states: Vec<OdeState>) -> Self
Construct from a vector of states (assumed sorted by time).
Sourcepub fn interpolate(&self, t: f64) -> Option<OdeState>
pub fn interpolate(&self, t: f64) -> Option<OdeState>
Interpolate the state at time t using linear (dense output) interpolation.
Returns None if t is outside the stored time interval.
Sourcepub fn component(&self, i: usize) -> Vec<f64>
pub fn component(&self, i: usize) -> Vec<f64>
Extract the trajectory of component i as a Vecf64`.
Returns an empty vector if i is out of bounds.
Sourcepub fn map_observable<G>(&self, g: G) -> Vec<f64>
pub fn map_observable<G>(&self, g: G) -> Vec<f64>
Evaluate a scalar observable g(t, y) along the trajectory.
Trait Implementations§
Source§impl Clone for OdeSolution
impl Clone for OdeSolution
Source§fn clone(&self) -> OdeSolution
fn clone(&self) -> OdeSolution
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 OdeSolution
impl RefUnwindSafe for OdeSolution
impl Send for OdeSolution
impl Sync for OdeSolution
impl Unpin for OdeSolution
impl UnsafeUnpin for OdeSolution
impl UnwindSafe for OdeSolution
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.