pub struct Solution<T, Y, D>{
pub t: Vec<T>,
pub y: Vec<Y>,
pub status: Status<T, Y, D>,
pub evals: Evals,
pub steps: Steps,
pub timer: Timer<T>,
}Expand description
The result produced by differential equation solvers.
§Fields
y- Outputted dependent variable points.t- Outputted independent variable points.status- Status of the solver.evals- Number of function evaluations.steps- Number of steps.timer- Timer for tracking solution time.
Fields§
§t: Vec<T>Outputted independent variable points.
y: Vec<Y>Outputted dependent variable points.
status: Status<T, Y, D>Status of the solver.
evals: EvalsNumber of function, Jacobian, and related evaluations.
steps: StepsNumber of steps taken during the solution.
timer: Timer<T>Timer tracking wall-clock time. Running during solving, Completed after finalization.
Implementations§
Source§impl<T, Y, D> Solution<T, Y, D>
impl<T, Y, D> Solution<T, Y, D>
Source§impl<T, Y, D> Solution<T, Y, D>
impl<T, Y, D> Solution<T, Y, D>
Sourcepub fn into_tuple(self) -> (Vec<T>, Vec<Y>)
pub fn into_tuple(self) -> (Vec<T>, Vec<Y>)
Consume the solution into (t, y) vectors.
Status, evaluation counters, steps, and timers are discarded.
§Returns
(Vec<T>, Vec<Y)- Tuple of time and state vectors.
Sourcepub fn last(&self) -> Result<(&T, &Y), Box<dyn Error>>
pub fn last(&self) -> Result<(&T, &Y), Box<dyn Error>>
Return the last accepted step (t, y).
§Returns
Result<(T, Y), Box<dyn std::error::Error>>- Result of time and state vector.
Sourcepub fn iter(&self) -> Zip<Iter<'_, T>, Iter<'_, Y>>
pub fn iter(&self) -> Zip<Iter<'_, T>, Iter<'_, Y>>
Returns an iterator over the solution.
§Returns
std::iter::Zip<std::slice::Iter<'_, T>, std::slice::Iter<'_, Y>>- An iterator yielding (t, y) tuples.
Trait Implementations§
Auto Trait Implementations§
impl<T, Y, D> Freeze for Solution<T, Y, D>
impl<T, Y, D> RefUnwindSafe for Solution<T, Y, D>
impl<T, Y, D> Send for Solution<T, Y, D>
impl<T, Y, D> Sync for Solution<T, Y, D>
impl<T, Y, D> Unpin for Solution<T, Y, D>
impl<T, Y, D> UnwindSafe for Solution<T, Y, D>
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.