pub struct SimulationResult {
pub times: Vec<f64>,
pub states: Vec<Vec<f64>>,
pub dimension: usize,
pub method: IntegrationMethod,
pub steps_taken: usize,
}Expand description
Output of a simulation run.
Fields§
§times: Vec<f64>Time points.
states: Vec<Vec<f64>>State vectors at each time point.
dimension: usizeNumber of state dimensions.
method: IntegrationMethodIntegration method used.
steps_taken: usizeNumber of steps taken.
Implementations§
Source§impl SimulationResult
impl SimulationResult
Sourcepub fn final_state(&self) -> Option<&[f64]>
pub fn final_state(&self) -> Option<&[f64]>
Returns the last state vector.
Sourcepub fn state_at(&self, index: usize) -> Option<&[f64]>
pub fn state_at(&self, index: usize) -> Option<&[f64]>
Returns the state vector at the given index.
Sourcepub fn column(&self, dim_index: usize) -> Vec<f64>
pub fn column(&self, dim_index: usize) -> Vec<f64>
Extracts the time series for a single dimension.
Auto Trait Implementations§
impl Freeze for SimulationResult
impl RefUnwindSafe for SimulationResult
impl Send for SimulationResult
impl Sync for SimulationResult
impl Unpin for SimulationResult
impl UnsafeUnpin for SimulationResult
impl UnwindSafe for SimulationResult
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