pub struct InitialConditions { /* private fields */ }Expand description
Initial conditions
Implementations§
Source§impl InitialConditions
impl InitialConditions
pub fn new() -> Self
Sourcepub fn set_condition(
&mut self,
field_id: &str,
cond_type: InitialConditionType,
values: Vec<f64>,
)
pub fn set_condition( &mut self, field_id: &str, cond_type: InitialConditionType, values: Vec<f64>, )
Register an initial condition for a field: its type and the initial values.
Sourcepub fn get_condition_type(
&self,
field_id: &str,
) -> Option<&InitialConditionType>
pub fn get_condition_type( &self, field_id: &str, ) -> Option<&InitialConditionType>
Get the initial condition type registered for a field, if any.
Sourcepub fn get_condition_values(&self, field_id: &str) -> Option<&Vec<f64>>
pub fn get_condition_values(&self, field_id: &str) -> Option<&Vec<f64>>
Get the initial condition values registered for a field, if any.
Sourcepub fn remove_condition(&mut self, field_id: &str)
pub fn remove_condition(&mut self, field_id: &str)
Remove a field’s initial condition (type and values).
Sourcepub fn list_condition_fields(&self) -> Vec<String>
pub fn list_condition_fields(&self) -> Vec<String>
List all field IDs that have a registered initial condition.
Sourcepub fn add_perturbation(&mut self, field_id: &str, perturbation: Perturbation)
pub fn add_perturbation(&mut self, field_id: &str, perturbation: Perturbation)
Add a perturbation for a field.
Sourcepub fn get_perturbation(&self, field_id: &str) -> Option<&Perturbation>
pub fn get_perturbation(&self, field_id: &str) -> Option<&Perturbation>
Get the perturbation registered for a field, if any.
Sourcepub fn list_perturbation_fields(&self) -> Vec<String>
pub fn list_perturbation_fields(&self) -> Vec<String>
List all field IDs that have a registered perturbation.
Auto Trait Implementations§
impl Freeze for InitialConditions
impl RefUnwindSafe for InitialConditions
impl Send for InitialConditions
impl Sync for InitialConditions
impl Unpin for InitialConditions
impl UnsafeUnpin for InitialConditions
impl UnwindSafe for InitialConditions
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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