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
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.
A fundamental assumptions was not met.
For example if the number of residuals changed.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for TerminationReason
impl Send for TerminationReason
impl Sync for TerminationReason
impl Unpin for TerminationReason
impl UnwindSafe for TerminationReason
Blanket Implementations
Mutably borrows from an owned value. Read more
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.