Rhino C++ API
8.12
|
#include <opennurbs_plus.h>
Public Member Functions | |
ON_SimpleMinimizer (int dim, const ON_Interval *domain, int max_it, double val_tol, const double *convergence_tol) | |
virtual | ~ON_SimpleMinimizer () |
int | Dimension () const |
virtual bool | Ev (const double *params, double *f, double *df, double **ddf) const |
pure virtual More... | |
int | LineEval (double t, double *f, double *df) |
bool | Minimize (const double *seed, double *val, double *params, bool *bError) |
Friends | |
class | CSimpleMinBrent |
ON_SimpleMinimizer should be used as a local minimizer of positive valued G2 functions. It requires first and second derivatives This is a local minimizer. If it hits the edge of the domain and the only way down is out of the domain, it will stop and consider itself successful. Failure means that the iteration count limit was hit and there was no convergence. In that case, the result will be no larger that that of the seed, and may be of use.
ON_SimpleMinimizer::ON_SimpleMinimizer | ( | int | dim, |
const ON_Interval * | domain, | ||
int | max_it, | ||
double | val_tol, | ||
const double * | convergence_tol | ||
) |
domain | dim of them |
max_it | stop after this many iterations |
val_tol | Stop if the function value is below this. If <= 0, only convergence_tol will be used. |
convergence_tol | dim of them. Stop if the change from an iteration is within these. Any that is less than ON_EPSILON^2 will be replaced by N_EPSILON^2. |
|
virtual |
int ON_SimpleMinimizer::Dimension | ( | ) | const |
|
virtual |
pure virtual
params | dim |
f | Function value. |
df | First partials. dim of them ort NULL |
ddf | Second partials. dim x dim or NULL. If df is NULL, ddf will not be computed. |
int ON_SimpleMinimizer::LineEval | ( | double | t, |
double * | f, | ||
double * | df | ||
) |
bool ON_SimpleMinimizer::Minimize | ( | const double * | seed, |
double * | val, | ||
double * | params, | ||
bool * | bError | ||
) |
If bError is true, val and params will not be filled in. If bError is false, val and params will be filled in with the best result found. In this case, a return of false means that the tolerances were not met.
seed | Input. Dim of them |
val | Output. Minimum function value found. |
params | Output. Dim of them. Parameters of minimum. |
bError | Output. If true, then there was a serious problem and the results in val and params are garbage. |
|
friend |