pub enum MinStatus {
Converged,
MaxIterations,
InvalidBracket,
NotFinite,
}Expand description
How one lane of a batch ended.
Only Converged means the lane located an extremum. Every
other variant is a failure a caller must handle; see the module-level
“Non-convergence is reported, never swallowed” section for the accessors that
make it hard to skip.
| Variant | last_iterate | Meaning |
|---|---|---|
Converged | the located extremum | the bracket met the tolerance |
MaxIterations | current bracket midpoint — not an extremum | ran out of iterations |
InvalidBracket | NaN | a bracket end is not finite |
NotFinite | the abscissa where it happened | the objective evaluated to NaN/infinity |
There is deliberately no analogue of
crate::math::parallel::RootStatus::NotBracketed. A root finder can check
its precondition — a sign change across the bracket is one comparison — and
refuse when it fails. A minimiser’s precondition is unimodality, which cannot
be checked from a finite number of evaluations. Adding a status that is never
returned would imply a guarantee this module does not provide.
§Units
Dimensionless — a status tag.
Variants§
Converged
The bracket shrank to the requested tolerance. Note that this says the bracket converged, not that the objective is unimodal — on a multimodal bracket a lane converges happily to a local extremum.
MaxIterations
max_iterations was reached with the bracket still wider than the
tolerance. The reported iterate is the current bracket midpoint and is
not claimed to be an extremum.
InvalidBracket
A bracket end was infinite or NaN, so there is no interval to contract.
NotFinite
The objective evaluated to a non-finite number. Iteration stops
immediately, because continuing would propagate the NaN into a
plausible-looking answer — and unlike a root finder there is no sign
structure left to recover from.