Trait optimization::Function [] [src]

pub trait Function {
    fn value(&self, position: &[f64]) -> f64;
}

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

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

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

Implementors