CostFunction

Trait CostFunction 

Source
pub trait CostFunction<R: RealScalar>: Function {
    // Required method
    fn cost(&mut self, params: &[R]) -> R;
}
Expand description

A trait for cost functions.

Required Methods§

Source

fn cost(&mut self, params: &[R]) -> R

Calculates the cost for the given parameters.

Implementors§