pub enum TerminationReason {
User(&'static str),
Numerical(&'static str),
ResidualsZero,
Orthogonal,
Converged {
ftol: bool,
xtol: bool,
},
NoImprovementPossible(&'static str),
LostPatience,
NoParameters,
NoResiduals,
WrongDimensions(&'static str),
}Expand description
Reasons for terminating the minimization.
Variants§
User(&'static str)
The residual or Jacobian computation was not successful, it returned None.
Numerical(&'static str)
Encountered NaN or $\pm\infty$.
ResidualsZero
The residuals are literally zero.
Orthogonal
The residuals vector and the Jacobian columns are almost orthogonal.
This is the gtol termination criterion.
Converged
The ftol or xtol criterion was fulfilled.
NoImprovementPossible(&'static str)
The bound for ftol, xtol or gtol was set so low that the
test passed with the machine epsilon but not with the actual
bound. This means you must increase the bound.
LostPatience
Maximum number of function evaluations was hit.
NoParameters
The number of parameters $n$ is zero.
NoResiduals
The number of residuals $m$ is zero.
WrongDimensions(&'static str)
The shape of the computed residuals or Jacobian is not correct.
Implementations§
Source§impl TerminationReason
impl TerminationReason
Sourcepub fn was_successful(&self) -> bool
pub fn was_successful(&self) -> bool
Compute whether the outcome is considered successful.
This does not necessarily mean we have a minimizer. Some termination criteria are approximations for necessary optimality conditions or check limitations due to floating point arithmetic.
Sourcepub fn was_usage_issue(&self) -> bool
pub fn was_usage_issue(&self) -> bool
A fundamental assumptions was not met.
For example if the number of residuals changed.
Trait Implementations§
Source§impl Debug for TerminationReason
impl Debug for TerminationReason
Source§impl PartialEq for TerminationReason
impl PartialEq for TerminationReason
impl Eq for TerminationReason
impl StructuralPartialEq for TerminationReason
Auto Trait Implementations§
impl Freeze for TerminationReason
impl RefUnwindSafe for TerminationReason
impl Send for TerminationReason
impl Sync for TerminationReason
impl Unpin for TerminationReason
impl UnsafeUnpin for TerminationReason
impl UnwindSafe for TerminationReason
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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.