pub struct NonlinearConjugateGradient {
pub beta: ConjugateGradientBeta,
/* private fields */
}Expand description
Nonlinear conjugate gradients: O(n) memory, a strong Wolfe line search with c₂ = 0.1, the
initial step of each line search scaled from the previous one (Nocedal and Wright eq. 3.60),
and a restart to steepest descent every n iterations or whenever the direction is not a
descent direction. Converges when ‖∇f‖∞ falls below the tolerance (default 1e-8). On a
strictly convex quadratic with exact line searches every variant reduces to linear CG.
Fields§
§beta: ConjugateGradientBetaImplementations§
Source§impl NonlinearConjugateGradient
impl NonlinearConjugateGradient
pub fn new(beta: ConjugateGradientBeta) -> Self
Trait Implementations§
Source§impl Clone for NonlinearConjugateGradient
impl Clone for NonlinearConjugateGradient
Source§impl Debug for NonlinearConjugateGradient
impl Debug for NonlinearConjugateGradient
Source§impl Default for NonlinearConjugateGradient
impl Default for NonlinearConjugateGradient
Source§impl<T: ObjectiveFunction, U: GradientFunction> GradientBasedMinimizationEngine<T, U> for NonlinearConjugateGradient
impl<T: ObjectiveFunction, U: GradientFunction> GradientBasedMinimizationEngine<T, U> for NonlinearConjugateGradient
fn gradient_based_minimize( &self, objective: &T, gradient: &U, initial: Vec<f64>, ) -> Result<OptimizationResult, ErrorsJSL>
Source§impl MinimizationControls for NonlinearConjugateGradient
impl MinimizationControls for NonlinearConjugateGradient
Source§fn set_bounds(&mut self, bounds: Option<Vec<(f64, f64)>>)
fn set_bounds(&mut self, bounds: Option<Vec<(f64, f64)>>)
Bounds are not supported; setting them makes minimization return an error.
Source§fn set_max_iterations(&mut self, max_iterations: Option<usize>)
fn set_max_iterations(&mut self, max_iterations: Option<usize>)
These traits use options to allow for algorithms to set and get the convergence criteria.
If the algorithm does not have a maximum number of iterations, this can be set to None.
fn get_max_iterations(&self) -> Option<usize>
Source§fn set_tolerance(&mut self, tolerance: Option<f64>)
fn set_tolerance(&mut self, tolerance: Option<f64>)
If the algorithm does not have a tolerance for convergence, this can be set to None.
fn get_tolerance(&self) -> Option<f64>
fn get_bounds(&self) -> Option<Vec<(f64, f64)>>
Auto Trait Implementations§
impl Freeze for NonlinearConjugateGradient
impl RefUnwindSafe for NonlinearConjugateGradient
impl Send for NonlinearConjugateGradient
impl Sync for NonlinearConjugateGradient
impl Unpin for NonlinearConjugateGradient
impl UnsafeUnpin for NonlinearConjugateGradient
impl UnwindSafe for NonlinearConjugateGradient
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