`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§

## Trait Implementations§

source§### impl<'de, F> Deserialize<'de> for BrentRoot<F>where
F: Deserialize<'de>,

### impl<'de, F> Deserialize<'de> for BrentRoot<F>where
F: Deserialize<'de>,

source§#### fn 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

source§### impl<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,

source§#### fn 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

source§#### fn 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>

Computes a single iteration of the algorithm and has access to the optimization problem
definition and the internal state of the solver.
Returns an updated

`state`

and optionally a `KV`

which holds key-value pairs used in
Observers.source§#### fn terminate_internal(&mut self, state: &I) -> TerminationStatus

#### fn terminate_internal(&mut self, state: &I) -> TerminationStatus

Checks whether basic termination reasons apply. Read more

source§#### fn terminate(&mut self, _state: &I) -> TerminationStatus

#### fn terminate(&mut self, _state: &I) -> TerminationStatus

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§

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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,

### impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,

§#### fn to_subset(&self) -> Option<SS>

#### fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct

`self`

from the equivalent element of its
superset. Read more§#### fn is_in_subset(&self) -> bool

#### fn is_in_subset(&self) -> bool

Checks if

`self`

is actually part of its subset `T`

(and can be converted to it).§#### fn to_subset_unchecked(&self) -> SS

#### fn to_subset_unchecked(&self) -> SS

Use with care! Same as

`self.to_subset`

but without any property checks. Always succeeds.§#### fn from_subset(element: &SS) -> SP

#### fn from_subset(element: &SS) -> SP

The inclusion map: converts

`self`

to the equivalent element of its superset.