Type Definition nlopt::NLoptMFn [] [src]

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

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

  • result - m-dimensional array to store the value f(x)
  • argument - n-dimensional array x
  • gradient - n×m-dimensional array to store the gradient grad f(x). The n dimension of gradient is stored contiguously, so that df_i / dx_j is stored in gradient[i*n + j]. If gradient is Some(x), the user is required to return a valid gradient, otherwise the optimization will most likely fail.
  • params - user defined data