DUNE: Uniform Navigational Environment
2.4.1
|
Public Types | |
enum | Result { OPT_CONVERGED, OPT_MAX_ITER, OPT_NOT_UNIMODAL, OPT_INVALID_ARGUMENTS } |
typedef double | math_fun_t (double, const void *) |
Static Public Member Functions | |
static Result | minimize (math_fun_t *f, const void *args, double a, double b, double tol, unsigned max_iter, double *min_out, double *tol_out) |
static Result | maximize (math_fun_t *f, const void *args, double a, double b, double tol, unsigned max_iter, double *max_out, double *tol_out) |
typedef double DUNE::Math::Optimization::math_fun_t(double, const void *) |
Typedef for handles of functions to optimize.
|
static |
Maximize a function.
f | Function to maximize. |
args | Function parameters. |
a | Beginning of interval for maximization. |
b | End of interval for maximization. |
tol | Max. absolute error. |
max_iter | Max. allowed iterations or 0 for unbounded. |
max_out | Found maximum. |
tol_out | Final absolute error. |
References minimize().
|
static |
Minimize a function.
f | Function to minimize. |
args | Function parameters. |
a | Beginning of interval for minimization. |
b | End of interval for minimization. |
tol | Max. absolute error. |
max_iter | Max. allowed iterations or 0 for unbounded. |
min_out | Found minimum. |
tol_out | Final absolute error. |
References OPT_CONVERGED, OPT_INVALID_ARGUMENTS, OPT_MAX_ITER, and OPT_NOT_UNIMODAL.
Referenced by maximize().