Crate nlopt [] [src]

nlopt

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

Structs

Function

Packs a function of type ObjectiveFn<T> with a user defined parameter set of type T.

MFunction

Packs an m-dimensional function of type NLoptMFn<T> with a user defined parameter set of type T.

Nlopt

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.

Enums

Algorithm
ConstraintType

Defines constants for equality constraints (of the form f(x) = 0) and inequality constraints (of the form f(x) <= 0).

FailState
SuccessState
Target

Target object function state

Statics

NUM_ALGORTITHMS

Functions

approximate_gradient

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 Definitions

NLoptMFn

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

ObjectiveFn

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

OptResult