pub struct Bfgs { /* private fields */ }Expand description
BFGS with a dense n × n inverse-Hessian approximation H, updated as
H ← (I − ρsyᵀ) H (I − ρysᵀ) + ρssᵀ, ρ = 1/(yᵀs), and initially scaled by yᵀs / yᵀy after
the first step. Converges when ‖∇f‖∞ falls below the tolerance (default 1e-8).
Implementations§
Trait Implementations§
Source§impl<T: ObjectiveFunction, U: GradientFunction> GradientBasedMinimizationEngine<T, U> for Bfgs
impl<T: ObjectiveFunction, U: GradientFunction> GradientBasedMinimizationEngine<T, U> for Bfgs
fn gradient_based_minimize( &self, objective: &T, gradient: &U, initial: Vec<f64>, ) -> Result<OptimizationResult, ErrorsJSL>
Source§impl MinimizationControls for Bfgs
impl MinimizationControls for Bfgs
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 Bfgs
impl RefUnwindSafe for Bfgs
impl Send for Bfgs
impl Sync for Bfgs
impl Unpin for Bfgs
impl UnsafeUnpin for Bfgs
impl UnwindSafe for Bfgs
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