Trait argmin::solver::conjugategradient::beta::NLCGBetaUpdate

source ·
pub trait NLCGBetaUpdate<G, P, F> {
    // Required method
    fn update(&self, nabla_f_k: &G, nabla_f_k_p_1: &G, p_k: &P) -> F;
}
Expand description

Interface for beta update methods (NonlinearConjugateGradient)

§Example

#[cfg(feature = "serde1")]
use serde::{Deserialize, Serialize};

#[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))]
struct MyBetaMethod {}

impl<G, P, F> NLCGBetaUpdate<G, P, F> for MyBetaMethod
where
    F: ArgminFloat,
{
    fn update(&self, dfk: &G, dfk1: &G, p_k: &P) -> F {
        // Compute updated beta
    }
}

Required Methods§

source

fn update(&self, nabla_f_k: &G, nabla_f_k_p_1: &G, p_k: &P) -> F

Update beta.

§Parameters
  • \nabla f_k
  • \nabla f_{k+1}
  • p_k

Implementors§

source§

impl<G, P, F> NLCGBetaUpdate<G, P, F> for FletcherReeves
where G: ArgminDot<G, F>, F: ArgminFloat,

source§

impl<G, P, F> NLCGBetaUpdate<G, P, F> for HestenesStiefel
where G: ArgminDot<G, F> + ArgminDot<P, F> + ArgminSub<G, G>, F: ArgminFloat,

source§

impl<G, P, F> NLCGBetaUpdate<G, P, F> for PolakRibiere
where G: ArgminDot<G, F> + ArgminSub<G, G> + ArgminL2Norm<F>, F: ArgminFloat,

source§

impl<G, P, F> NLCGBetaUpdate<G, P, F> for PolakRibierePlus
where G: ArgminDot<G, F> + ArgminSub<G, G> + ArgminL2Norm<F>, F: ArgminFloat,