pub trait ObjectiveFunction: Send + Sync {
// Required methods
fn evaluate(&self, parameters: &[f64]) -> f64;
fn bounds(&self) -> Vec<(f64, f64)>;
fn name(&self) -> &str;
// Provided methods
fn gradient(&self, parameters: &[f64]) -> Option<Vec<f64>> { ... }
fn hessian(&self, parameters: &[f64]) -> Option<Vec<Vec<f64>>> { ... }
}Expand description
Optimization objective function