Struct argmin::solver::linesearch::backtracking::BacktrackingLineSearch
source · [−]pub struct BacktrackingLineSearch<P, L, F> { /* private fields */ }
Expand description
The Backtracking line search is a simple method to find a step length which obeys the Armijo (sufficient decrease) condition.
References:
[0] Jorge Nocedal and Stephen J. Wright (2006). Numerical Optimization. Springer. ISBN 0-387-30303-0.
[1] Wikipedia: https://en.wikipedia.org/wiki/Backtracking_line_search
Implementations
sourceimpl<P: Default, L, F: ArgminFloat> BacktrackingLineSearch<P, L, F>
impl<P: Default, L, F: ArgminFloat> BacktrackingLineSearch<P, L, F>
Trait Implementations
sourceimpl<P, L, F> ArgminLineSearch<P, F> for BacktrackingLineSearch<P, L, F> where
P: Clone + Serialize + ArgminSub<P, P> + ArgminDot<P, f64> + ArgminScaledAdd<P, f64, P>,
L: LineSearchCondition<P, F>,
F: ArgminFloat + Serialize + DeserializeOwned,
impl<P, L, F> ArgminLineSearch<P, F> for BacktrackingLineSearch<P, L, F> where
P: Clone + Serialize + ArgminSub<P, P> + ArgminDot<P, f64> + ArgminScaledAdd<P, f64, P>,
L: LineSearchCondition<P, F>,
F: ArgminFloat + Serialize + DeserializeOwned,
sourcefn set_search_direction(&mut self, search_direction: P)
fn set_search_direction(&mut self, search_direction: P)
Set search direction
sourcefn set_init_alpha(&mut self, alpha: F) -> Result<(), Error>
fn set_init_alpha(&mut self, alpha: F) -> Result<(), Error>
Set initial alpha value
sourceimpl<P: Clone, L: Clone, F: Clone> Clone for BacktrackingLineSearch<P, L, F>
impl<P: Clone, L: Clone, F: Clone> Clone for BacktrackingLineSearch<P, L, F>
sourcefn clone(&self) -> BacktrackingLineSearch<P, L, F>
fn clone(&self) -> BacktrackingLineSearch<P, L, 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, P, L, F> Deserialize<'de> for BacktrackingLineSearch<P, L, F> where
P: Deserialize<'de>,
L: Deserialize<'de>,
F: Deserialize<'de>,
impl<'de, P, L, F> Deserialize<'de> for BacktrackingLineSearch<P, L, F> where
P: Deserialize<'de>,
L: Deserialize<'de>,
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<P, L, F> Serialize for BacktrackingLineSearch<P, L, F> where
P: Serialize,
L: Serialize,
F: Serialize,
impl<P, L, F> Serialize for BacktrackingLineSearch<P, L, F> where
P: Serialize,
L: Serialize,
F: Serialize,
sourceimpl<O, P, L, F> Solver<O> for BacktrackingLineSearch<P, L, F> where
P: Clone + Default + Serialize + DeserializeOwned + ArgminScaledAdd<P, F, P>,
O: ArgminOp<Param = P, Output = F, Float = F>,
L: LineSearchCondition<P, F>,
F: ArgminFloat,
impl<O, P, L, F> Solver<O> for BacktrackingLineSearch<P, L, F> where
P: Clone + Default + Serialize + DeserializeOwned + ArgminScaledAdd<P, F, P>,
O: ArgminOp<Param = P, Output = F, Float = F>,
L: LineSearchCondition<P, 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(&mut self, state: &IterState<O>) -> TerminationReason
fn terminate(&mut self, state: &IterState<O>) -> TerminationReason
Checks whether the algorithm must be terminated
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
Auto Trait Implementations
impl<P, L, F> RefUnwindSafe for BacktrackingLineSearch<P, L, F> where
F: RefUnwindSafe,
L: RefUnwindSafe,
P: RefUnwindSafe,
impl<P, L, F> Send for BacktrackingLineSearch<P, L, F> where
F: Send,
L: Send,
P: Send,
impl<P, L, F> Sync for BacktrackingLineSearch<P, L, F> where
F: Sync,
L: Sync,
P: Sync,
impl<P, L, F> Unpin for BacktrackingLineSearch<P, L, F> where
F: Unpin,
L: Unpin,
P: Unpin,
impl<P, L, F> UnwindSafe for BacktrackingLineSearch<P, L, F> where
F: UnwindSafe,
L: UnwindSafe,
P: 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