pub struct Status<T> {
pub message: String,
pub x: Vec<T>,
pub fx: T,
pub n_evals: usize,
pub converged: bool,
}Expand description
A status message struct containing all information about a minimization result.
Fields§
§message: String§x: Vec<T>The current position of the minimization.
fx: TThe current value of the minimization problem function at Status::x.
n_evals: usizeThe number of function 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.
Implementations§
source§impl<T> Status<T>
impl<T> 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: (Vec<T>, T))
pub fn update_position(&mut self, pos: (Vec<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 increment_n_evals(&mut self)
pub fn increment_n_evals(&mut self)
Increments Status::n_evals by 1.
Trait Implementations§
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
Mutably borrows from an owned value. Read more
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)
🔬This is a nightly-only experimental API. (
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.