Type Definition nlopt::MObjectiveFn
[−]
[src]
type MObjectiveFn<T> = fn(result: &mut [f64], argument: &[f64], gradient: Option<&mut [f64]>, user_data: &mut T);
A function f(x) | R^n --> R^m
with additional user specified parameters user_data
of type T
.
result
-m
-dimensional array to store the valuef(x)
argument
-n
-dimensional arrayx
gradient
-n×m
-diconstraint array to store the gradientgrad f(x)
. The n dimension of gradient is stored contiguously, so thatdf_i / dx_j
is stored ingradient[i*n + j]
. Ifgradient
isSome(x)
, the user is required to return a valid gradient, otherwise the optimization will most likely fail.user_data
- user defined data