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
}
}