#[non_exhaustive]pub enum SymplexError {
ContradictoryAssumptions {
symbol: String,
a: String,
b: String,
},
PrecisionExhausted {
requested: u32,
achieved: u32,
},
FreeSymbol {
name: String,
},
Unevaluable {
reason: String,
},
ComputationFailed {
operation: &'static str,
reason: String,
},
NotImplemented(String),
Divergent {
operation: &'static str,
reason: String,
},
NoSolution {
operation: &'static str,
reason: String,
},
InfiniteSolutions {
operation: &'static str,
reason: String,
},
InvalidArgument {
operation: &'static str,
reason: String,
},
}Expand description
Errors that can occur during symbolic computation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ContradictoryAssumptions
Contradictory assumptions were specified for a symbol.
Fields
PrecisionExhausted
Numerical evaluation could not achieve the requested precision.
Fields
FreeSymbol
Numerical evaluation failed because the expression contains a free (unbound) symbol.
Unevaluable
Numerical evaluation failed because a node type cannot be evaluated to a finite number.
ComputationFailed
A symbolic computation could not produce a result.
The operation field names the operation that failed (e.g., “limit”,
“solve”, “series”). The reason field provides a human-readable
explanation.
Fields
NotImplemented(String)
A feature or operation is not yet implemented.
Divergent
An integral, sum, product, or limit was shown to diverge.
Fields
NoSolution
An equation or system is inconsistent — it has no solution at all.
Distinct from Ok(vec![]), which some solvers use for “no roots in
the requested domain”; this variant means the problem itself is
contradictory (e.g. x + y = 1, x + y = 2).
Fields
InfiniteSolutions
An equation or system is satisfied by infinitely many values and the solver cannot (or was not asked to) return a parametric family.
For example solve on the identity 0 = 0, or an underdetermined
linear system when a unique solution was requested.
InvalidArgument
A caller-supplied argument was invalid (wrong length, not a symbol, out of the function’s domain, …).
Implementations§
Source§impl SymplexError
impl SymplexError
Sourcepub fn invalid_argument(
operation: &'static str,
reason: impl Into<String>,
) -> Self
pub fn invalid_argument( operation: &'static str, reason: impl Into<String>, ) -> Self
InvalidArgument for operation: a
caller-supplied value that fails validation (a shape, a parameter
out of range, a symbol that is not one of the variables).
Sourcepub fn computation_failed(
operation: &'static str,
reason: impl Into<String>,
) -> Self
pub fn computation_failed( operation: &'static str, reason: impl Into<String>, ) -> Self
ComputationFailed for operation: the
algorithm could not complete on valid input (a budget ran out, a
series did not converge, an internal invariant did not hold).
Trait Implementations§
Source§impl Debug for SymplexError
impl Debug for SymplexError
Source§impl Display for SymplexError
impl Display for SymplexError
Source§impl Error for SymplexError
impl Error for SymplexError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for SymplexError
impl RefUnwindSafe for SymplexError
impl Send for SymplexError
impl Sync for SymplexError
impl Unpin for SymplexError
impl UnsafeUnpin for SymplexError
impl UnwindSafe for SymplexError
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more