Struct argmin::solver::goldensectionsearch::GoldenSectionSearch
source · [−]pub struct GoldenSectionSearch<F> { /* private fields */ }
Expand description
Golden-section search
The golden-section search is a technique for finding an extremum (minimum or maximum) of a function inside a specified interval.
The method operates by successively narrowing the range of values on the specified interval, which makes it relatively slow, but very robust. The technique derives its name from the fact that the algorithm maintains the function values for four points whose three interval widths are in the ratio 2-φ:2φ-3:2-φ where φ is the golden ratio. These ratios are maintained for each iteration and are maximally efficient.
The min_bound
and max_bound
arguments define values that bracket the expected minimum. The
init_estimate
argument is the initial estimate of the minimum that is required to be larger
than min_bound
and smaller than max_bound
.
References:
Implementations
sourceimpl<F> GoldenSectionSearch<F> where
F: ArgminFloat,
impl<F> GoldenSectionSearch<F> where
F: ArgminFloat,
Trait Implementations
sourceimpl<F: Clone> Clone for GoldenSectionSearch<F>
impl<F: Clone> Clone for GoldenSectionSearch<F>
sourcefn clone(&self) -> GoldenSectionSearch<F>
fn clone(&self) -> GoldenSectionSearch<F>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'de, F> Deserialize<'de> for GoldenSectionSearch<F> where
F: Deserialize<'de>,
impl<'de, F> Deserialize<'de> for GoldenSectionSearch<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<F> Serialize for GoldenSectionSearch<F> where
F: Serialize,
impl<F> Serialize for GoldenSectionSearch<F> where
F: Serialize,
sourceimpl<O, F> Solver<O> for GoldenSectionSearch<F> where
O: ArgminOp<Output = F, Param = F, Float = F>,
F: ArgminFloat,
impl<O, F> Solver<O> for GoldenSectionSearch<F> where
O: ArgminOp<Output = F, Param = F, Float = F>,
F: ArgminFloat,
sourcefn init(
&mut self,
op: &mut OpWrapper<O>,
state: &IterState<O>
) -> Result<Option<ArgminIterData<O>>, Error>
fn init(
&mut self,
op: &mut OpWrapper<O>,
state: &IterState<O>
) -> Result<Option<ArgminIterData<O>>, Error>
Initializes the algorithm Read more
sourcefn next_iter(
&mut self,
op: &mut OpWrapper<O>,
state: &IterState<O>
) -> Result<ArgminIterData<O>, Error>
fn next_iter(
&mut self,
op: &mut OpWrapper<O>,
state: &IterState<O>
) -> Result<ArgminIterData<O>, Error>
Computes one iteration of the algorithm.
sourcefn terminate_internal(&mut self, state: &IterState<O>) -> TerminationReason
fn terminate_internal(&mut self, state: &IterState<O>) -> TerminationReason
Checks whether basic termination reasons apply. Read more
sourcefn terminate(&mut self, _state: &IterState<O>) -> TerminationReason
fn terminate(&mut self, _state: &IterState<O>) -> TerminationReason
Checks whether the algorithm must be terminated
Auto Trait Implementations
impl<F> RefUnwindSafe for GoldenSectionSearch<F> where
F: RefUnwindSafe,
impl<F> Send for GoldenSectionSearch<F> where
F: Send,
impl<F> Sync for GoldenSectionSearch<F> where
F: Sync,
impl<F> Unpin for GoldenSectionSearch<F> where
F: Unpin,
impl<F> UnwindSafe for GoldenSectionSearch<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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more