Overload List
| # | Signature | Description |
|---|---|---|
| 1 | int MinBrent(double ax, double bx, TRealFunction Func, const TMtxFloatPrecision FloatPrecision, const DewArray<double> &Consts, const DewArray<tObject *> &ObjConst, double &MinX, int MaxIter, double Accuracy = 1.0E-8, tStrings *Verbose = null); | Minimizes single variable function. |
| 2 | int MinBrent(double ax, double bx, TRealFunction Func, const TMtxFloatPrecision FloatPrecision, const DewArray<double> &Consts, const DewArray<tObject *> &ObjConst, double &MinX); | Minimizes single variable function by using default settings and no log. |
Overload 1: int MinBrent(double ax, double bx, TRealFunction Func, const TMtxFloatPrecision FloatPrecision, const DewArray<double> &Consts, const DewArray<tObject *> &ObjConst, double &MinX, int MaxIter, double Accuracy = 1.0E-8, tStrings *Verbose = null);
Minimizes single variable function.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | ax | double | Defines initial lower limit for minimum search. |
| 2 | bx | double | Defines initial upper limit for minimum search. |
| 3 | Func | TRealFunction | Real function of single variable (must be of TRealFunction type) to be minimized. |
| 4 | FloatPrecision | const TMtxFloatPrecision | Specifies the floating point precision to be used by the routine. |
| 5 | Consts | const DewArray<double> & | Additional Fun constant parameters (can be/is usually nil). |
| 6 | ObjConst | const DewArray<tObject *> & | Additional Fun constant parameters (can be/is usually nil). |
| 7 | MinX | double & | Returns the position of function minimum. |
| 8 | MaxIter | int | Maximum allowed numer of minimum search iterations. |
| 9 | Accuracy = 1.0E-8 | double | Desired minimum position tolerance. |
| 10 | Verbose = null | tStrings * | If assigned, stores Func, evaluated at each iteration step. Optionally, you can also pass TOptControl object to the Verbose parameter. This allows the optimization procedure to be interrupted from another thread and optionally also allows logging and iteration count monitoring. |
Returns: the number of iterations required to reach the solution(minimum) within given tolerance.
What it computes. Locates a local minimizer x^* of a
real function of one variable on the bracket [a_x,b_x] using Brent's method (golden-section search refined by parabolic interpolation; the modified algol-60 localmin). For the example objective
y(x) = sin(x) + (x+2)^2
Domain. a_x,b_x are finite reals; if b_x < a_x they
are swapped internally, so the order of the bracket does not matter. MaxIter > 0 caps the iterations; Accuracy ≥ 0 is the desired position tolerance.
Defined behaviour. Returns the iteration count and writes the
minimizer to MinX; it converges to a stationary point inside the bracket. MinBrent has no stop-reason output: if Func returns NaN the NaN propagates into MinX (and is reported in Verbose when assigned). The bracket is assumed to contain a minimum; for a monotone objective the result is the corresponding endpoint.
Minimizes the function of one variable. This routine uses slightly modified version of the algol 60 procedure localmin, introduced by Richard Brent.
Overload 2: int MinBrent(double ax, double bx, TRealFunction Func, const TMtxFloatPrecision FloatPrecision, const DewArray<double> &Consts, const DewArray<tObject *> &ObjConst, double &MinX);
Minimizes single variable function by using default settings and no log.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | ax | double | |
| 2 | bx | double | |
| 3 | Func | TRealFunction | |
| 4 | FloatPrecision | const TMtxFloatPrecision | |
| 5 | Consts | const DewArray<double> & | |
| 6 | ObjConst | const DewArray<tObject *> & | |
| 7 | MinX | double & |
Use this version if algorithm step logs are not needed.