Func

Trait Func 

Source
pub trait Func<U>: Fn(&[f64], &mut U) -> f64 { }
Expand description

A trait representing objective and constraints functions.

An objective function takes the form of a closure f(x: &[f64], user_data: &mut U) -> f64

  • x - n-dimensional array
  • user_data - user defined data for objective and constraint functions

Implementors§

Source§

impl<T, U> Func<U> for T
where T: Fn(&[f64], &mut U) -> f64,