#[non_exhaustive]pub enum NumericError {
NonFiniteInput {
name: &'static str,
},
NonFiniteEvaluation {
name: &'static str,
at: Option<f64>,
},
InvalidArgument {
name: &'static str,
reason: &'static str,
},
DimensionMismatch {
name: &'static str,
expected: usize,
found: usize,
},
NoSignChange {
f_lower: f64,
f_upper: f64,
},
ZeroPolynomial,
Singular {
name: &'static str,
},
RankDeficient {
name: &'static str,
rank: usize,
required: usize,
},
NotSymmetric {
row: usize,
column: usize,
},
NotPositiveDefinite {
pivot: usize,
},
NotConverged {
name: &'static str,
error_estimate: f64,
},
}Expand description
Why a numeric routine refused its input or could not produce a value.
Every variant names the offending argument or condition. A routine never substitutes a default, clamps silently, or returns NaN in place of one of these.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NonFiniteInput
An input value was NaN or infinite. name is the argument.
NonFiniteEvaluation
A caller-supplied function returned NaN or infinity.
Fields
InvalidArgument
An argument was finite but outside its valid range.
Fields
DimensionMismatch
Sizes of two arguments disagree.
Fields
NoSignChange
The function has the same sign at both ends of the bracket, so a root is not guaranteed between them.
ZeroPolynomial
Every coefficient of the polynomial is zero: every point is a root.
Singular
A square matrix is singular to working precision.
RankDeficient
A least-squares matrix has fewer independent columns than unknowns, so the solution is not unique.
Fields
NotSymmetric
A matrix given to a symmetric solver is not symmetric.
Fields
NotPositiveDefinite
A symmetric matrix is not positive definite to working precision.
NotConverged
An iterative routine stopped without meeting its tolerance. Returned
only by the converged() accessors; the routines themselves report
this case in their result’s status with the estimate they reached.
Trait Implementations§
Source§impl Clone for NumericError
impl Clone for NumericError
Source§fn clone(&self) -> NumericError
fn clone(&self) -> NumericError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more