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

Fields

ftol: bool
xtol: bool

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

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.