pub struct EnsembleResult<S: Scalar> {
pub trajectories: Vec<SdeResult<S>>,
pub n_success: usize,
pub n_failed: usize,
pub seeds: Vec<u64>,
}Expand description
Result of ensemble simulation.
Fields§
§trajectories: Vec<SdeResult<S>>Individual trajectory results
n_success: usizeNumber of successful simulations
n_failed: usizeNumber of failed simulations
seeds: Vec<u64>Seeds used for each trajectory (for reproducibility)
Implementations§
Source§impl<S: Scalar> EnsembleResult<S>
impl<S: Scalar> EnsembleResult<S>
Sourcepub fn new(trajectories: Vec<SdeResult<S>>, seeds: Vec<u64>) -> Self
pub fn new(trajectories: Vec<SdeResult<S>>, seeds: Vec<u64>) -> Self
Create a new ensemble result.
Sourcepub fn final_values(&self, component: usize) -> Vec<Option<S>>
pub fn final_values(&self, component: usize) -> Vec<Option<S>>
Get all final values for a specific component.
Returns None for failed trajectories.
Sourcepub fn successful_final_values(&self, component: usize) -> Vec<S>
pub fn successful_final_values(&self, component: usize) -> Vec<S>
Get all successful final values for a component.
Sourcepub fn successful(&self) -> impl Iterator<Item = &SdeResult<S>>
pub fn successful(&self) -> impl Iterator<Item = &SdeResult<S>>
Iterate over successful trajectories.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for EnsembleResult<S>
impl<S> RefUnwindSafe for EnsembleResult<S>where
S: RefUnwindSafe,
impl<S> Send for EnsembleResult<S>
impl<S> Sync for EnsembleResult<S>
impl<S> Unpin for EnsembleResult<S>where
S: Unpin,
impl<S> UnsafeUnpin for EnsembleResult<S>
impl<S> UnwindSafe for EnsembleResult<S>where
S: UnwindSafe,
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more