ObjectiveFunction

Trait ObjectiveFunction 

Source
pub trait ObjectiveFunction {
    // Required methods
    fn evaluate(&self, x: &Array1<f64>) -> f64;
    fn dimensions(&self) -> usize;
    fn bounds(&self) -> (Vec<f64>, Vec<f64>);
}
Expand description

Trait for objective functions to be optimized

Required Methods§

Source

fn evaluate(&self, x: &Array1<f64>) -> f64

Evaluate the objective function at a given point

Source

fn dimensions(&self) -> usize

Get the number of dimensions of the problem

Source

fn bounds(&self) -> (Vec<f64>, Vec<f64>)

Get the bounds of the search space

Implementors§