pub struct RootOpts {
pub xtol: f64,
pub rtol: f64,
pub max_iter: usize,
}Expand description
Options for the scalar root finders brent_root, bisect and
newton_root.
use symplex::optimize::RootOpts;
let opts = RootOpts::default();
assert_eq!(opts.xtol, 2e-12);
assert_eq!(opts.rtol, 4.0 * f64::EPSILON);
assert_eq!(opts.max_iter, 100);Fields§
§xtol: f64Absolute tolerance on the root location (default 2e-12).
rtol: f64Relative tolerance on the root location (default 4·ε).
The bracketing methods stop once the bracket width is at most
xtol + rtol·|x|; Newton stops once the step is that small.
max_iter: usizeMaximum number of iterations (default 100). Each iteration costs
one function evaluation (plus one derivative evaluation for Newton);
the bracketing methods also evaluate the two endpoints up front.
Trait Implementations§
impl StructuralPartialEq for RootOpts
Auto Trait Implementations§
impl Freeze for RootOpts
impl RefUnwindSafe for RootOpts
impl Send for RootOpts
impl Sync for RootOpts
impl Unpin for RootOpts
impl UnsafeUnpin for RootOpts
impl UnwindSafe for RootOpts
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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