![]() |
Object-oriented Scientific Computing Library: Version 0.910
|
Minimization of a function using the safeguarded step-length algorithm of Gill and Murray [GSL]. More...
#include <gsl_min_quad_golden.h>
This class is unfinished.
Documentation from GSL:
This algorithm performs univariate minimization (i.e., line search). It requires only objective function values g(x) to compute the minimum. The algorithm maintains an interval of uncertainty [a,b] and a point x in the interval [a,b] such that a < x < b, and g(a) > g(x) and g(x) < g(b). The algorithm also maintains the three points with the smallest objective values x, v and w such that g(x) < g(v) < g(w). The algorithm terminates when max( x-a, b-x ) < 2(r |x| + t) where r and t are small positive reals. At a given iteration, the algorithm first fits a quadratic through the three points (x, g(x)), (v, g(v)) and (w, g(w)) and computes the location of the minimum u of the resulting quadratic. If u is in the interval [a,b] then g(u) is computed. If u is not in the interval [a,b], and either v < x and w < x, or v > x and w > x (i.e., the quadratic is extrapolating), then a point u' is computed using a safeguarding procedure and g(u') is computed. If u is not in the interval [a,b], and the quadratic is not extrapolating, then a point u'' is computed using approximate golden section and g(u'') is computed. After evaluating g() at the appropriate new point, a, b, x, v, and w are updated and the next iteration is performed. The algorithm is based on work presented in the following references. Algorithms for Minimization without derivatives Richard Brent Prentice-Hall Inc., Englewood Cliffs, NJ, 1973 Safeguarded Steplength Algorithms for Optimization using Descent Methods Philip E. Gill and Walter Murray Division of Numerical Analysis and Computing National Physical Laboratory, Teddington, United Kingdom NPL Report NAC 37, August 1974
Definition at line 100 of file gsl_min_quad_golden.h.
Public Member Functions | |
int | set (func_t &func, double xmin, double lower, double upper) |
Set the function and the initial bracketing interval. | |
int | set_with_values (func_t &func, double xmin, double fmin, double lower, double fl, double upper, double fu) |
Set the function, the initial bracketing interval, and the corresponding function values. | |
int | iterate () |
Perform an iteration. | |
virtual int | min_bkt (double &x2, double x1, double x3, double &fmin, func_t &func) |
Calculate the minimum fmin of func with x2 bracketed between x1 and x3 . | |
virtual const char * | type () |
Return string denoting type ("gsl_min_quad_golden") | |
Data Fields | |
double | x_minimum |
Location of minimum. | |
double | x_lower |
Lower bound. | |
double | x_upper |
Upper bound. | |
double | f_minimum |
Minimum value. | |
double | f_lower |
Value at lower bound. | |
double | f_upper |
Value at upper bound. | |
Protected Member Functions | |
int | compute_f_values (func_t &func, double xminimum, double *fminimum, double xlower, double *flower, double xupper, double *fupper) |
Compute the function values at the various points. | |
Protected Attributes | |
func_t * | uf |
The function. | |
double | x_prev_small |
double | f_prev_small |
double | x_small |
double | f_small |
double | step_size |
double | stored_step |
double | prev_stored_step |
size_t | num_iter |
double | rel_err_val |
double | abs_err_val |
double | golden_mean |
double | golden_ratio |
virtual int gsl_min_quad_golden< func_t >::min_bkt | ( | double & | x2, |
double | x1, | ||
double | x3, | ||
double & | fmin, | ||
func_t & | func | ||
) | [inline, virtual] |
Note that this algorithm requires that the initial guess already brackets the minimum, i.e. ,
and
. This is different from cern_minimize, where the initial value of the first parameter to cern_minimize::min_bkt() is ignored.
Implements minimize_bkt< func_t >.
Definition at line 399 of file gsl_min_quad_golden.h.
Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).