[−][src]Trait nlopt::ObjFn
A trait representing an objective function.
An objective function takes the form of a closure f(x: &[f64], gradient: Option<&mut [f64], user_data: &mut U) -> f64
x
-n
-dimensional arraygradient
-n
-dimensional array to store the gradientgrad f(x)
. Ifgradient
matchesSome(x)
, the user is required to provide a gradient, otherwise the optimization will probabely fail.user_data
- user defined data