pub struct Status {
pub message: String,
pub x: Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>,
pub x0: Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>,
pub bounds: Option<Vec<Bound>>,
pub fx: f64,
pub n_f_evals: usize,
pub n_g_evals: usize,
pub converged: bool,
pub hess: Option<Matrix<f64, Dyn, Dyn, VecStorage<f64, Dyn, Dyn>>>,
pub cov: Option<Matrix<f64, Dyn, Dyn, VecStorage<f64, Dyn, Dyn>>>,
pub err: Option<Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>>,
pub parameters: Option<Vec<String>>,
}Expand description
A status message struct containing all information about a minimization result.
Fields§
§message: String§x: Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>The current position of the minimization.
x0: Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>The initial position of the minimization.
bounds: Option<Vec<Bound>>The bounds used for the minimization.
fx: f64The current value of the minimization problem function at Status::x.
n_f_evals: usizeThe number of function evaluations (approximately, this is left up to individual
Algorithms to correctly compute and may not be exact).
n_g_evals: usizeThe number of gradient evaluations (approximately, this is left up to individual
Algorithms to correctly compute and may not be exact).
converged: boolFlag that says whether or not the fit is in a converged state.
hess: Option<Matrix<f64, Dyn, Dyn, VecStorage<f64, Dyn, Dyn>>>The Hessian matrix at the end of the fit (None if not computed yet)
cov: Option<Matrix<f64, Dyn, Dyn, VecStorage<f64, Dyn, Dyn>>>Covariance matrix at the end of the fit (None if not computed yet)
err: Option<Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>>Errors on parameters at the end of the fit (None if not computed yet)
parameters: Option<Vec<String>>Optional parameter names
Implementations§
Source§impl Status
impl Status
Sourcepub fn update_message(&mut self, message: &str)
pub fn update_message(&mut self, message: &str)
Updates the Status::message field.
Sourcepub fn update_position(
&mut self,
pos: (Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>, f64),
)
pub fn update_position( &mut self, pos: (Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>, f64), )
Updates the Status::x and Status::fx fields.
Sourcepub fn set_converged(&mut self)
pub fn set_converged(&mut self)
Sets Status::converged to be true.
Sourcepub fn inc_n_f_evals(&mut self)
pub fn inc_n_f_evals(&mut self)
Increments Status::n_f_evals by 1.
Sourcepub fn inc_n_g_evals(&mut self)
pub fn inc_n_g_evals(&mut self)
Increments Status::n_g_evals by 1.
Sourcepub fn set_parameter_names<L>(&mut self, names: &[L])
pub fn set_parameter_names<L>(&mut self, names: &[L])
Sets parameter names.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Status
impl<'de> Deserialize<'de> for Status
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Status, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Status, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl ReadWrite for Status
impl ReadWrite for Status
Source§fn create_null() -> Self
fn create_null() -> Self
pickle module
can load data. This generally shouldn’t be used to construct the struct in regular code.Source§impl Serialize for Status
impl Serialize for Status
Source§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 Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnwindSafe for Status
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,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
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>
self from the equivalent element of its
superset. Read moreSource§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).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.