pub trait Function<D: Dimension>: Sync {
    // Required method
    fn value(&self, position: &Array<f64, D>) -> f64;
}
Expand description

Defines an objective function f that is subject to minimization. trait must be sync to be able to be sent over threads

Required Methods§

source

fn value(&self, position: &Array<f64, D>) -> f64

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

Implementors§

source§

impl<D: Dimension, S: Summation<D>> Function<D> for S

always return the mean of the sum