Skip to main content

ObjectiveFunction

Trait ObjectiveFunction 

Source
pub trait ObjectiveFunction {
    // Required method
    fn evaluate(&self, params: &[f64; 4]) -> f64;

    // Provided method
    fn in_bounds(&self, _params: &[f64; 4]) -> bool { ... }
}
Expand description

Objective function trait for optimization

Required Methods§

Source

fn evaluate(&self, params: &[f64; 4]) -> f64

Evaluate objective function

Provided Methods§

Source

fn in_bounds(&self, _params: &[f64; 4]) -> bool

Check if parameters are within bounds

Implementors§