lbfgsb_optimize

Function lbfgsb_optimize 

Source
pub fn lbfgsb_optimize<F, C>(
    x: &mut [f64],
    bounds: &[(f64, f64)],
    objective: &F,
    max_iterations: usize,
    tol: f64,
    callback: Option<C>,
    config: Option<LbfgsbConfig>,
) -> Result<(f64, Vec<f64>), Box<dyn Error>>
where F: Fn(&[f64]) -> f64 + Sync, C: Fn(&[f64], f64) + Sync,
Expand description

L-BFGS-B optimizer implementation with optional configuration.

§Arguments

  • x - Initial point (will be modified in-place)
  • bounds - Box constraints for each parameter
  • objective - Objective function to minimize
  • max_iterations - Maximum number of iterations
  • tol - Convergence tolerance for gradient norm
  • callback - Optional callback function invoked after each iteration
  • config - Optional configuration parameters (uses defaults if None)

§Returns

  • Result<(f64, Vec<f64>), Box<dyn std::error::Error>> - Best objective value and parameters