pub enum RootError<E> {
Eval(E),
ExactRootDegenerate {
at: f64,
},
DegenerateDerivative {
at: f64,
derivative: f64,
},
BracketInvalid {
lo: f64,
hi: f64,
},
BracketNoStraddle {
f_lo: f64,
f_hi: f64,
},
BracketingExhausted {
direction: f64,
seed: f64,
},
ConvergedRootDegenerate {
at: f64,
},
}Expand description
Error returned by find_root_monotone. Generic over the oracle’s
own error type E, which is surfaced verbatim through
RootError::Eval.
Variants§
Eval(E)
The oracle returned an error at the given point.
ExactRootDegenerate
|F(seed)| <= tol already, but F'(seed) is zero / non-finite,
so the derivative the caller needs is degenerate.
DegenerateDerivative
F'(seed) is zero / non-finite away from a root, so no monotone
direction can be inferred.
BracketInvalid
A supplied analytic bracket was invalid (non-finite or lo == hi).
BracketNoStraddle
A supplied analytic bracket did not straddle zero.
BracketingExhausted
Geometric bracketing exhausted max_bracket_iters (or the step
cap) without straddling the root.
ConvergedRootDegenerate
Refinement converged in a but |F'| at the best point is zero /
non-finite, so the reported derivative would be degenerate.
Trait Implementations§
impl<E: Copy> Copy for RootError<E>
Source§impl<E: Display + Debug> Error for RootError<E>
impl<E: Display + Debug> Error for RootError<E>
1.30.0 · 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()
impl<E: PartialEq> StructuralPartialEq for RootError<E>
Auto Trait Implementations§
impl<E> Freeze for RootError<E>where
E: Freeze,
impl<E> RefUnwindSafe for RootError<E>where
E: RefUnwindSafe,
impl<E> Send for RootError<E>where
E: Send,
impl<E> Sync for RootError<E>where
E: Sync,
impl<E> Unpin for RootError<E>where
E: Unpin,
impl<E> UnsafeUnpin for RootError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for RootError<E>where
E: UnwindSafe,
Blanket Implementations§
impl<T> Boilerplate for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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>
Converts
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>
Converts
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