pub struct Status {
pub message: String,
pub x: DVector<Float>,
pub x0: DVector<Float>,
pub bounds: Option<Vec<Bound>>,
pub fx: Float,
pub n_f_evals: usize,
pub n_g_evals: usize,
pub converged: bool,
pub hess: Option<DMatrix<Float>>,
pub cov: Option<DMatrix<Float>>,
pub err: Option<DVector<Float>>,
pub parameters: Option<Vec<String>>,
}
Expand description
A status message struct containing all information about a minimization result.
Fields§
§message: String
§x: DVector<Float>
The current position of the minimization.
x0: DVector<Float>
The initial position of the minimization.
bounds: Option<Vec<Bound>>
The bounds used for the minimization.
fx: Float
The current value of the minimization problem function at Status::x
.
n_f_evals: usize
The number of function evaluations (approximately, this is left up to individual
Algorithm
s to correctly compute and may not be exact).
n_g_evals: usize
The number of gradient evaluations (approximately, this is left up to individual
Algorithm
s to correctly compute and may not be exact).
converged: bool
Flag that says whether or not the fit is in a converged state.
hess: Option<DMatrix<Float>>
The Hessian matrix at the end of the fit (None
if not computed yet)
cov: Option<DMatrix<Float>>
Covariance matrix at the end of the fit (None
if not computed yet)
err: Option<DVector<Float>>
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: (DVector<Float>, Float))
pub fn update_position(&mut self, pos: (DVector<Float>, Float))
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: AsRef<str>>(&mut self, names: &[L])
pub fn set_parameter_names<L: AsRef<str>>(&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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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<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.