Type Definition nlopt::ObjectiveFn [] [src]

type ObjectiveFn<T> = fn(argument: &[f64], gradient: Option<&mut [f64]>, params: T) -> f64;

A function f(x) | R^n --> R with additional user specified parameters params of type T.

  • argument - n-dimensional array x
  • gradient - n-dimensional array to store the gradient grad f(x). If gradient matches Some(x), the user is required to provide a gradient, otherwise the optimization will probabely fail.
  • params - user defined data

Returns

f(x)