#include <minimize.h>
Definition at line 238 of file minimize.h.
Public Member Functions | |
virtual int | min (double &x, double &fmin, param_t &pa, func_t &func) |
Calculate the minimum min of func w.r.t 'x'. | |
virtual int | min_bkt (double &x2, double x1, double x3, double &fmin, param_t &pa, func_t &func)=0 |
Calculate the minimum min of func with x2 bracketed between x1 and x3. | |
virtual int | min_de (double &x, double &fmin, param_t &pa, func_t &func, dfunc_t &df) |
Calculate the minimum min of func with derivative dfunc w.r.t 'x'. | |
virtual int | bracket (double &ax, double &bx, double &cx, double &fa, double &fb, double &fc, param_t &pa, func_t &func) |
Given interval (ax,bx) , attempt to bracket a minimum for function func . | |
virtual const char * | type () |
Return string denoting type ("minimize_bkt"). | |
Data Fields | |
int | bracket_iter |
The number of iterations for automatically bracketing a minimum (default 20). |
virtual int bracket | ( | double & | ax, | |
double & | bx, | |||
double & | cx, | |||
double & | fa, | |||
double & | fb, | |||
double & | fc, | |||
param_t & | pa, | |||
func_t & | func | |||
) | [inline, virtual] |
Given interval (ax,bx)
, attempt to bracket a minimum for function func
.
Upon success, fa=func(ax)
, fb=func(bx)
, and fc=func(cx)
with fb<fa
, fb<fc
and ax<bx<cx
. The initial values of cx
, fa
, fb
, and fc
are all ignored.
The number of iterations is controlled by bracket_iter.
ax
, bx
, and the midpoint (ax+bx)/2
.Reimplemented from minimize.
Definition at line 316 of file minimize.h.
virtual int min | ( | double & | x, | |
double & | fmin, | |||
param_t & | pa, | |||
func_t & | func | |||
) | [inline, virtual] |
Calculate the minimum min
of func
w.r.t 'x'.
If this is not overloaded, it attempts to bracket the minimum using bracket() and then calls min_bkt() with the newly bracketed minimum.
Implements minimize.
Definition at line 261 of file minimize.h.
virtual int min_bkt | ( | double & | x2, | |
double | x1, | |||
double | x3, | |||
double & | fmin, | |||
param_t & | pa, | |||
func_t & | func | |||
) | [pure virtual] |
Calculate the minimum min
of func
with x2 bracketed between x1 and x3.
If this is not overloaded, it ignores the bracket and calls min().
Implements minimize.
Implemented in cern_minimize, and gsl_min_brent.
virtual int min_de | ( | double & | x, | |
double & | fmin, | |||
param_t & | pa, | |||
func_t & | func, | |||
dfunc_t & | df | |||
) | [inline, virtual] |
Calculate the minimum min
of func
with derivative dfunc
w.r.t 'x'.
If this is not overloaded, it attempts to bracket the minimum using bracket() and then calls min_bkt_de() with the newly bracketed minimum.
Implements minimize.
Definition at line 287 of file minimize.h.
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page