[][src]Struct argmin::solver::conjugategradient::nonlinear_cg::NonlinearConjugateGradient

pub struct NonlinearConjugateGradient<P, L, B> { /* fields omitted */ }

The nonlinear conjugate gradient is a generalization of the conjugate gradient method for nonlinear optimization problems.



[0] Jorge Nocedal and Stephen J. Wright (2006). Numerical Optimization. Springer. ISBN 0-387-30303-0.


impl<P, L, B> NonlinearConjugateGradient<P, L, B> where
    P: Default

pub fn new(linesearch: L, beta_method: B) -> Result<Self, Error>[src]

Constructor (Polak Ribiere Conjugate Gradient (PR-CG))

pub fn restart_iters(self, iters: u64) -> Self[src]

Specifiy the number of iterations after which a restart should be performed This allows the algorithm to "forget" previous information which may not be helpful anymore.

pub fn restart_orthogonality(self, v: f64) -> Self[src]

Set the value for the orthogonality measure. Setting this parameter leads to a restart of the algorithm (setting beta = 0) after two consecutive search directions are not orthogonal anymore. In other words, if this condition is met:

|\nabla f_k^T * \nabla f_{k-1}| / | \nabla f_k ||^2 >= v

A typical value for v is 0.1.

Trait Implementations

impl<O, P, L, B> Solver<O> for NonlinearConjugateGradient<P, L, B> where
    O: ArgminOp<Param = P, Output = f64>,
    P: Clone + Default + Serialize + DeserializeOwned + ArgminSub<P, P> + ArgminDot<P, f64> + ArgminScaledAdd<P, f64, P> + ArgminAdd<P, P> + ArgminMul<f64, P> + ArgminDot<P, f64> + ArgminNorm<f64>,
    O::Hessian: Default,
    L: Clone + ArgminLineSearch<P> + Solver<OpWrapper<O>>,
    B: ArgminNLCGBetaUpdate<P>, 

fn terminate_internal(&mut self, state: &IterState<O>) -> TerminationReason

Checks whether basic termination reasons apply. Read more

fn terminate(&mut self, _state: &IterState<O>) -> TerminationReason

Checks whether the algorithm must be terminated

impl<P, L, B> Serialize for NonlinearConjugateGradient<P, L, B> where
    P: Serialize,
    L: Serialize,
    B: Serialize

impl<'de, P, L, B> Deserialize<'de> for NonlinearConjugateGradient<P, L, B> where
    P: Deserialize<'de>,
    L: Deserialize<'de>,
    B: Deserialize<'de>, 

Auto Trait Implementations

impl<P, L, B> Send for NonlinearConjugateGradient<P, L, B> where
    B: Send,
    L: Send,
    P: Send

impl<P, L, B> Sync for NonlinearConjugateGradient<P, L, B> where
    B: Sync,
    L: Sync,
    P: Sync

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 

impl<T, U> TryFrom for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> BorrowMut for T where
    T: ?Sized

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized