#[non_exhaustive]pub enum PolynomialError {
NonFinite,
LeadingCoefficientZero,
DegreeOverflow,
CapacityExceeded,
Empty,
VariableOutOfRange,
DuplicateNode,
TooFewSamples,
SpanNotPositive,
DidNotConverge {
steps: usize,
},
Linalg(LinalgError),
}Expand description
Errors from polynomial construction, evaluation, and root finding.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NonFinite
A coefficient, node, or sample was infinite or NaN.
LeadingCoefficientZero
The highest coefficient is zero, so the polynomial is not of the degree asked for.
DegreeOverflow
The result needs more coefficients than the polynomial has room for.
CapacityExceeded
More terms than the polynomial can hold.
Empty
There is nothing to evaluate.
VariableOutOfRange
A variable index past the number of variables the polynomial has.
DuplicateNode
Two interpolation points share the same position.
TooFewSamples
Fewer samples were given than the number of coefficients to fit.
SpanNotPositive
A piece covers zero or a negative amount of the parameter.
DidNotConverge
Root isolation ran out of steps before separating every root.
Linalg(LinalgError)
A fit or an endpoint solve could not be factorized.
Trait Implementations§
Source§impl Clone for PolynomialError
impl Clone for PolynomialError
Source§fn clone(&self) -> PolynomialError
fn clone(&self) -> PolynomialError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PolynomialError
Source§impl Debug for PolynomialError
impl Debug for PolynomialError
Source§impl Display for PolynomialError
impl Display for PolynomialError
Source§impl Error for PolynomialError
impl Error for PolynomialError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<LinalgError> for PolynomialError
impl From<LinalgError> for PolynomialError
Source§fn from(e: LinalgError) -> Self
fn from(e: LinalgError) -> Self
Converts to this type from the input type.
Source§impl From<PolynomialError> for MotionError
impl From<PolynomialError> for MotionError
Source§fn from(e: PolynomialError) -> Self
fn from(e: PolynomialError) -> Self
Converts to this type from the input type.
Source§impl From<PolynomialError> for CalcError
impl From<PolynomialError> for CalcError
Source§fn from(e: PolynomialError) -> Self
fn from(e: PolynomialError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PolynomialError
impl PartialEq for PolynomialError
impl StructuralPartialEq for PolynomialError
Auto Trait Implementations§
impl Freeze for PolynomialError
impl RefUnwindSafe for PolynomialError
impl Send for PolynomialError
impl Sync for PolynomialError
impl Unpin for PolynomialError
impl UnsafeUnpin for PolynomialError
impl UnwindSafe for PolynomialError
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
Mutably borrows from an owned value. Read more