pub struct Ridder { /* private fields */ }Expand description
Ridder’s method root finder.
Implementations§
Source§impl Ridder
impl Ridder
Sourcepub fn with_max_evaluations(self, evaluations: usize) -> Self
pub fn with_max_evaluations(self, evaluations: usize) -> Self
Set the evaluation cap (builder form).
Sourcepub fn with_lower_bound(self, lower_bound: Real) -> Self
pub fn with_lower_bound(self, lower_bound: Real) -> Self
Restrict the search to x >= lower_bound (builder form).
Sourcepub fn with_upper_bound(self, upper_bound: Real) -> Self
pub fn with_upper_bound(self, upper_bound: Real) -> Self
Restrict the search to x <= upper_bound (builder form).
Trait Implementations§
impl Copy for Ridder
Source§impl Solver1D for Ridder
impl Solver1D for Ridder
Source§fn config(&self) -> &SolverConfig
fn config(&self) -> &SolverConfig
The shared configuration (evaluation cap, domain bounds).
Source§fn config_mut(&mut self) -> &mut SolverConfig
fn config_mut(&mut self) -> &mut SolverConfig
Mutable access to the shared configuration.
Source§fn solve_impl<F>(
&mut self,
f: &mut F,
x_acc: Real,
st: &mut Solver1DState,
) -> QlResult<Real>
fn solve_impl<F>( &mut self, f: &mut F, x_acc: Real, st: &mut Solver1DState, ) -> QlResult<Real>
Refine the already-bracketed root of
f (invariants per Solver1DState)
to the given accuracy. f is FnMut because QuantLib functors may carry
mutable state (e.g. recording the last argument). Read moreSource§fn max_evaluations(&self) -> usize
fn max_evaluations(&self) -> usize
The evaluation cap for the bracketing search and the refinement step.
Source§fn set_max_evaluations(&mut self, evaluations: usize)
fn set_max_evaluations(&mut self, evaluations: usize)
Set the evaluation cap.
Source§fn set_lower_bound(&mut self, lower_bound: Real)
fn set_lower_bound(&mut self, lower_bound: Real)
Restrict the search to
x >= lower_bound (QuantLib’s setLowerBound).Source§fn set_upper_bound(&mut self, upper_bound: Real)
fn set_upper_bound(&mut self, upper_bound: Real)
Restrict the search to
x <= upper_bound (QuantLib’s setUpperBound).Auto Trait Implementations§
impl Freeze for Ridder
impl RefUnwindSafe for Ridder
impl Send for Ridder
impl Sync for Ridder
impl Unpin for Ridder
impl UnsafeUnpin for Ridder
impl UnwindSafe for Ridder
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