Struct argmin::solver::linesearch::hagerzhang::HagerZhangLineSearch
source · [−]pub struct HagerZhangLineSearch<P, F> { /* private fields */ }
Expand description
The Hager-Zhang line search is a method to find a step length which obeys the strong Wolfe conditions.
References
[0] William W. Hager and Hongchao Zhang. “A new conjugate gradient method with guaranteed descent and an efficient line search.” SIAM J. Optim. 16(1), 2006, 170-192. DOI: https://doi.org/10.1137/030601880
Implementations
sourceimpl<P: Default, F: ArgminFloat> HagerZhangLineSearch<P, F>
impl<P: Default, F: ArgminFloat> HagerZhangLineSearch<P, F>
sourceimpl<P, F> HagerZhangLineSearch<P, F> where
P: Clone + Default + Serialize + DeserializeOwned + ArgminScaledAdd<P, F, P> + ArgminDot<P, F>,
F: ArgminFloat,
impl<P, F> HagerZhangLineSearch<P, F> where
P: Clone + Default + Serialize + DeserializeOwned + ArgminScaledAdd<P, F, P> + ArgminDot<P, F>,
F: ArgminFloat,
Trait Implementations
sourceimpl<P, F> ArgminLineSearch<P, F> for HagerZhangLineSearch<P, F> where
P: Clone + Default + Serialize + ArgminSub<P, P> + ArgminDot<P, f64> + ArgminScaledAdd<P, f64, P>,
F: ArgminFloat,
impl<P, F> ArgminLineSearch<P, F> for HagerZhangLineSearch<P, F> where
P: Clone + Default + Serialize + ArgminSub<P, P> + ArgminDot<P, f64> + ArgminScaledAdd<P, f64, P>,
F: ArgminFloat,
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, F: Clone> Clone for HagerZhangLineSearch<P, F>
impl<P: Clone, F: Clone> Clone for HagerZhangLineSearch<P, F>
sourcefn clone(&self) -> HagerZhangLineSearch<P, F>
fn clone(&self) -> HagerZhangLineSearch<P, 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<P: Default, F: ArgminFloat> Default for HagerZhangLineSearch<P, F>
impl<P: Default, F: ArgminFloat> Default for HagerZhangLineSearch<P, F>
sourceimpl<'de, P, F> Deserialize<'de> for HagerZhangLineSearch<P, F> where
P: Deserialize<'de>,
F: Deserialize<'de>,
impl<'de, P, F> Deserialize<'de> for HagerZhangLineSearch<P, F> where
P: 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, F> Serialize for HagerZhangLineSearch<P, F> where
P: Serialize,
F: Serialize,
impl<P, F> Serialize for HagerZhangLineSearch<P, F> where
P: Serialize,
F: Serialize,
sourceimpl<P, O, F> Solver<O> for HagerZhangLineSearch<P, F> where
O: ArgminOp<Param = P, Output = F, Float = F>,
P: Clone + Default + Serialize + DeserializeOwned + ArgminSub<P, P> + ArgminDot<P, F> + ArgminScaledAdd<P, F, P>,
F: ArgminFloat,
impl<P, O, F> Solver<O> for HagerZhangLineSearch<P, F> where
O: ArgminOp<Param = P, Output = F, Float = F>,
P: Clone + Default + Serialize + DeserializeOwned + ArgminSub<P, P> + ArgminDot<P, F> + ArgminScaledAdd<P, F, P>,
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, F> RefUnwindSafe for HagerZhangLineSearch<P, F> where
F: RefUnwindSafe,
P: RefUnwindSafe,
impl<P, F> Send for HagerZhangLineSearch<P, F> where
F: Send,
P: Send,
impl<P, F> Sync for HagerZhangLineSearch<P, F> where
F: Sync,
P: Sync,
impl<P, F> Unpin for HagerZhangLineSearch<P, F> where
F: Unpin,
P: Unpin,
impl<P, F> UnwindSafe for HagerZhangLineSearch<P, F> where
F: 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