Crate nlopt

source ·
Expand description


This is a wrapper for nlopt, a C library of useful optimization algorithms. For details of the various algorithms, consult the nlopt docs


  • This is the central struct of this library. It represents an optimization of a given function, called the objective function. The argument x to this function is an n-dimensional double-precision vector. The dimensions are set at creation of the struct and cannot be changed afterwards. NLopt offers different optimization algorithms. One must be chosen at struct creation and cannot be changed afterwards. Always use Nlopt::<T>::new() to create an Nlopt struct.



  • A trait representing a multi-objective function.
  • A trait representing an objective function.


  • Helper function to calculate gradient of function numerically. Can be useful when a gradient must be provided to the optimization algorithm and a closed-form derivative cannot be obtained

Type Aliases