pub struct BrentRoot<F> { /* private fields */ }
Expand description
Brent’s method
A root-finding algorithm combining the bisection method, the secant method and inverse quadratic interpolation. It has the reliability of bisection but it can be as quick as some of the less-reliable methods.
Requirements on the optimization problem
The optimization problem is required to implement CostFunction
.
Reference
Implementations
sourceimpl<F: ArgminFloat> BrentRoot<F>
impl<F: ArgminFloat> BrentRoot<F>
Trait Implementations
sourceimpl<'de, F> Deserialize<'de> for BrentRoot<F> where
F: Deserialize<'de>,
impl<'de, F> Deserialize<'de> for BrentRoot<F> where
F: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<O, F> Solver<O, IterState<F, (), (), (), F>> for BrentRoot<F> where
O: CostFunction<Param = F, Output = F>,
F: ArgminFloat,
impl<O, F> Solver<O, IterState<F, (), (), (), F>> for BrentRoot<F> where
O: CostFunction<Param = F, Output = F>,
F: ArgminFloat,
sourcefn init(
&mut self,
problem: &mut Problem<O>,
state: IterState<F, (), (), (), F>
) -> Result<(IterState<F, (), (), (), F>, Option<KV>), Error>
fn init(
&mut self,
problem: &mut Problem<O>,
state: IterState<F, (), (), (), F>
) -> Result<(IterState<F, (), (), (), F>, Option<KV>), Error>
Initializes the algorithm. Read more
sourcefn next_iter(
&mut self,
problem: &mut Problem<O>,
state: IterState<F, (), (), (), F>
) -> Result<(IterState<F, (), (), (), F>, Option<KV>), Error>
fn next_iter(
&mut self,
problem: &mut Problem<O>,
state: IterState<F, (), (), (), F>
) -> Result<(IterState<F, (), (), (), F>, Option<KV>), Error>
sourcefn terminate_internal(&mut self, state: &I) -> TerminationReason
fn terminate_internal(&mut self, state: &I) -> TerminationReason
Checks whether basic termination reasons apply. Read more
sourcefn terminate(&mut self, _state: &I) -> TerminationReason
fn terminate(&mut self, _state: &I) -> TerminationReason
Used to implement stopping criteria, in particular criteria which are not covered by
(terminate_internal
. Read more
Auto Trait Implementations
impl<F> RefUnwindSafe for BrentRoot<F> where
F: RefUnwindSafe,
impl<F> Send for BrentRoot<F> where
F: Send,
impl<F> Sync for BrentRoot<F> where
F: Sync,
impl<F> Unpin for BrentRoot<F> where
F: Unpin,
impl<F> UnwindSafe for BrentRoot<F> where
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more