gsl_min_brent Class Template Reference

#include <gsl_min_brent.h>

Inheritance diagram for gsl_min_brent:

minimize< param_t, func_t >

Detailed Description

template<class param_t, class func_t = funct<param_t>>
class gsl_min_brent< param_t, func_t >

One-dimensional minimization (GSL).

Todo:
Simplify temporary storage and document stopping conditions.

Definition at line 40 of file gsl_min_brent.h.


Public Member Functions

int set (func_t &func, double xmin, double lower, double upper, param_t &pa)
 Set the function to be minimized and the initial brackeing interval.
int set_with_values (func_t &func, double xmin, double fmin, double lower, double fl, double upper, double fu, param_t &pa)
 Set the function to be minimized and the initial brackeing interval.
int iterate ()
 Perform an iteration.
virtual ~gsl_min_brent ()
virtual int min_bkt (double &x2, double x1, double x3, double &fmin, param_t &pa, func_t &func)
 Calculate the minimum min of func with x2 bracketed between x1 and x3.
virtual const char * type ()
 Return string denoting type ("gsl_min_brent").

Data Fields

double x_minimum
 Location of minimum.
double x_lower
 Lower bound.
double x_upper
 Upper mound.
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, param_t &pa)
 Compute the function values at the various points.

Protected Attributes

func_t * uf
 The function.
param_t * up
 The parameters.
Temporary storage
double d
double e
double v
double w
double f_v
double f_w

Member Function Documentation

virtual int min_bkt ( double &  x2,
double  x1,
double  x3,
double &  fmin,
param_t &  pa,
func_t &  func 
) [inline, virtual]

Calculate the minimum min of func with x2 bracketed between x1 and x3.

Note that this algorithm requires that the initial guess already brackets the minimum, i.e. $ x_1 < x_2 < x_3 $, $ f(x_1) > f(x_2) $ and $ f(x_3) > f(x_2) $. This is different from cern_minimize, where the initial value of the first parameter to cern_minimize::min_bkt() is ignored.

Reimplemented from minimize< param_t, func_t >.

Definition at line 276 of file gsl_min_brent.h.


The documentation for this class was generated from the following file:
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.