Trait Function

Source
pub trait Function {
    // Required method
    fn value(&self, position: &[f64]) -> f64;
}
Expand description

Defines an objective function f that is subject to minimization.

For convenience every function with the same signature as value() qualifies as an objective function, e.g., minimizing a closure is perfectly fine.

Required Methods§

Source

fn value(&self, position: &[f64]) -> f64

Computes the objective function at a given position x, i.e., f(x) = y.

Implementors§