pub enum LineSearch {
Armijo {
control: Scalar,
cut_back: Scalar,
max_steps: usize,
},
Error {
cut_back: Scalar,
max_steps: usize,
},
Goldstein {
control: Scalar,
cut_back: Scalar,
max_steps: usize,
},
Wolfe {
control_1: Scalar,
control_2: Scalar,
cut_back: Scalar,
max_steps: usize,
strong: bool,
},
None,
}Expand description
Available line search algorithms.
Variants§
Armijo
The Armijo condition.
Error
Backtrack for errors.
Goldstein
The Goldstein conditions.
Wolfe
The Wolfe conditions.
None
No line search.
Implementations§
Source§impl LineSearch
impl LineSearch
Sourcepub fn backtrack_merit(
&self,
merit: impl FnMut(Scalar) -> Result<Scalar, String>,
value: Scalar,
slope: Scalar,
step_size: Scalar,
) -> Result<Scalar, LineSearchError>
pub fn backtrack_merit( &self, merit: impl FnMut(Scalar) -> Result<Scalar, String>, value: Scalar, slope: Scalar, step_size: Scalar, ) -> Result<Scalar, LineSearchError>
Backtrack on a merit function of the step size alone.
The exact penalty function is not differentiable, its norm having a kink wherever a constraint is satisfied, so its slope along the step is supplied rather than recovered from a gradient.
pub fn backtrack<X, J, D, W, E>( &self, function: impl FnMut(&X, Scalar) -> Result<Scalar, String>, jacobian: impl FnMut(&X) -> Result<J, String>, argument: &X, jacobian0: &J, decrement: &D, step_size: Scalar, ) -> Result<Scalar, LineSearchError>
Trait Implementations§
Source§impl Clone for LineSearch
impl Clone for LineSearch
Source§fn clone(&self) -> LineSearch
fn clone(&self) -> LineSearch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LineSearch
impl Debug for LineSearch
Source§impl Default for LineSearch
impl Default for LineSearch
Auto Trait Implementations§
impl Freeze for LineSearch
impl RefUnwindSafe for LineSearch
impl Send for LineSearch
impl Sync for LineSearch
impl Unpin for LineSearch
impl UnsafeUnpin for LineSearch
impl UnwindSafe for LineSearch
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