Struct ErrorModels
pub struct ErrorModels { /* private fields */ }
Expand description
Collection of error models for all possible outputs in the model/dataset This struct holds a vector of error models, each corresponding to a specific output in the pharmacometric analysis.
This is a wrapper around a vector of ErrorModels, its size is determined by the number of outputs in the model/dataset.
Implementations§
§impl ErrorModels
impl ErrorModels
pub fn new() -> ErrorModels
pub fn add( self, outeq: usize, model: ErrorModel, ) -> Result<ErrorModels, ErrorModelError>
pub fn iter(&self) -> impl Iterator<Item = (usize, &ErrorModel)>
pub fn into_iter(self) -> impl Iterator<Item = (usize, ErrorModel)>
pub fn iter_mut(&mut self) -> impl Iterator<Item = (usize, &mut ErrorModel)>
pub fn hash(&self) -> u64
pub fn errorpoly(&self, outeq: usize) -> Result<ErrorPoly, ErrorModelError>
pub fn errorpoly(&self, outeq: usize) -> Result<ErrorPoly, ErrorModelError>
pub fn scalar(&self, outeq: usize) -> Result<f64, ErrorModelError>
pub fn scalar(&self, outeq: usize) -> Result<f64, ErrorModelError>
pub fn set_errorpoly(
&mut self,
outeq: usize,
poly: ErrorPoly,
) -> Result<(), ErrorModelError>
pub fn set_errorpoly( &mut self, outeq: usize, poly: ErrorPoly, ) -> Result<(), ErrorModelError>
pub fn set_scalar(
&mut self,
outeq: usize,
scalar: f64,
) -> Result<(), ErrorModelError>
pub fn set_scalar( &mut self, outeq: usize, scalar: f64, ) -> Result<(), ErrorModelError>
Sets the scalar value for the specified output equation.
§Arguments
outeq
- The index of the output equation.scalar
- The new scalar value to set.
pub fn sigma(&self, prediction: &Prediction) -> Result<f64, ErrorModelError>
pub fn sigma(&self, prediction: &Prediction) -> Result<f64, ErrorModelError>
Computes the standard deviation (sigma) for the specified output equation and prediction.
§Arguments
outeq
- The index of the output equation.prediction
- ThePrediction
to use for the calculation.
§Returns
A Result
containing the computed sigma value or an ErrorModelError
if the calculation fails.
pub fn variance(&self, prediction: &Prediction) -> Result<f64, ErrorModelError>
pub fn variance(&self, prediction: &Prediction) -> Result<f64, ErrorModelError>
Computes the variance for the specified output equation and prediction.
§Arguments
outeq
- The index of the output equation.prediction
- ThePrediction
to use for the calculation.
§Returns
A Result
containing the computed variance or an ErrorModelError
if the calculation fails.
pub fn sigma_from_value(
&self,
outeq: usize,
value: f64,
) -> Result<f64, ErrorModelError>
pub fn sigma_from_value( &self, outeq: usize, value: f64, ) -> Result<f64, ErrorModelError>
Computes the standard deviation (sigma) for the specified output equation and value.
§Arguments
outeq
- The index of the output equation.value
- The value to use for the calculation.
§Returns
A Result
containing the computed sigma value or an ErrorModelError
if the calculation fails.
pub fn variance_from_value(
&self,
outeq: usize,
value: f64,
) -> Result<f64, ErrorModelError>
pub fn variance_from_value( &self, outeq: usize, value: f64, ) -> Result<f64, ErrorModelError>
Computes the variance for the specified output equation and value.
§Arguments
outeq
- The index of the output equation.value
- The value to use for the calculation.
§Returns
A Result
containing the computed variance or an ErrorModelError
if the calculation fails.
Trait Implementations§
§impl Clone for ErrorModels
impl Clone for ErrorModels
§fn clone(&self) -> ErrorModels
fn clone(&self) -> ErrorModels
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for ErrorModels
impl Debug for ErrorModels
§impl Default for ErrorModels
impl Default for ErrorModels
§fn default() -> ErrorModels
fn default() -> ErrorModels
§impl<'de> Deserialize<'de> for ErrorModels
impl<'de> Deserialize<'de> for ErrorModels
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ErrorModels, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ErrorModels, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl From<Vec<ErrorModel>> for ErrorModels
impl From<Vec<ErrorModel>> for ErrorModels
§fn from(models: Vec<ErrorModel>) -> ErrorModels
fn from(models: Vec<ErrorModel>) -> ErrorModels
§impl Serialize for ErrorModels
impl Serialize for ErrorModels
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for ErrorModels
impl RefUnwindSafe for ErrorModels
impl Send for ErrorModels
impl Sync for ErrorModels
impl Unpin for ErrorModels
impl UnwindSafe for ErrorModels
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
§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>
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>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.