pub struct Status<T: Scalar> {
pub message: String,
pub x: DVector<T>,
pub x0: DVector<T>,
pub bounds: Option<Vec<Bound<T>>>,
pub fx: T,
pub n_f_evals: usize,
pub n_g_evals: usize,
pub converged: bool,
pub hess: Option<DMatrix<T>>,
pub cov: Option<DMatrix<T>>,
pub err: Option<DVector<T>>,
pub parameters: Option<Vec<String>>,
}Expand description
A status message struct containing all information about a minimization result.
Fields§
§message: String§x: DVector<T>The current position of the minimization.
x0: DVector<T>The initial position of the minimization.
bounds: Option<Vec<Bound<T>>>The bounds used for the minimization.
fx: TThe 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<DMatrix<T>>The Hessian matrix at the end of the fit (None if not computed yet)
cov: Option<DMatrix<T>>Covariance matrix at the end of the fit (None if not computed yet)
err: Option<DVector<T>>Errors on parameters at the end of the fit (None if not computed yet)
parameters: Option<Vec<String>>Optional parameter names
Implementations§
Source§impl<T: Scalar> Status<T>
impl<T: Scalar> Status<T>
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<T>, T))
pub fn update_position(&mut self, pos: (DVector<T>, T))
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, T> Deserialize<'de> for Status<T>where
T: Deserialize<'de> + Scalar,
impl<'de, T> Deserialize<'de> for Status<T>where
T: Deserialize<'de> + Scalar,
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<T> Freeze for Status<T>where
T: Freeze,
impl<T> RefUnwindSafe for Status<T>where
T: RefUnwindSafe,
impl<T> Send for Status<T>where
T: Send,
impl<T> Sync for Status<T>where
T: Sync,
impl<T> Unpin for Status<T>where
T: Unpin,
impl<T> UnwindSafe for Status<T>where
T: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)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.