gsl_mmin_base Class Template Reference

#include <gsl_mmin_conf.h>

Inheritance diagram for gsl_mmin_base:

multi_min< param_t, func_t, func_t, vec_t > gsl_mmin_conf gsl_mmin_conf< param_t, func_t, vec_t, alloc_vec_t, alloc_t, dfunc_t > gsl_mmin_conf< param_t, multi_vfunct< param_t, nv >, double[nv], double[nv], array_alloc< double[nv]>, grad_vfunct< param_t, nv >, gradient_array< param_t, multi_vfunct< param_t, nv >, nv >, simple_grad_array< param_t, multi_vfunct< param_t, nv >, nv > > gsl_mmin_conp gsl_mmin_conf_array

Detailed Description

template<class param_t, class func_t = multi_funct<param_t>, class vec_t = ovector_view, class alloc_vec_t = ovector, class alloc_t = ovector_alloc, class dfunc_t = grad_funct<param_t,ovector_view>, class auto_grad_t = gradient<param_t,func_t,ovector_view>, class def_auto_grad_t = simple_grad<param_t,func_t,ovector_view>>
class gsl_mmin_base< param_t, func_t, vec_t, alloc_vec_t, alloc_t, dfunc_t, auto_grad_t, def_auto_grad_t >

Base minimization routines for gsl_mmin_conf and gsl_mmin_conp.

Definition at line 42 of file gsl_mmin_conf.h.


Public Member Functions

 gsl_mmin_base ()
int base_set (func_t &ufunc, param_t &pa)
 Set the function.
int base_set_de (func_t &ufunc, dfunc_t &udfunc, param_t &pa)
 Set the function and the gradient.
int base_allocate (size_t nn)
 Allocate memory.
int base_free ()
 Clear allocated memory.

Data Fields

double deriv_h
 Stepsize for finite-differencing ( default $ 10^{-4} $ ).
int nmaxiter
 Maximum iterations for line minimization (default 10).
def_auto_grad_t def_grad
 Default automatic Gradient object.

Protected Member Functions

void take_step (const gsl_vector *x, const gsl_vector *px, double stepx, double lambda, gsl_vector *x1x, gsl_vector *dx)
 Take a step.
void intermediate_point (const gsl_vector *x, const gsl_vector *px, double lambda, double pg, double stepa, double stepc, double fa, double fc, gsl_vector *x1x, gsl_vector *dx, gsl_vector *gradient, double *stepx, double *f)
 Line minimization.
void minimize (const gsl_vector *x, const gsl_vector *xp, double lambda, double stepa, double stepb, double stepc, double fa, double fb, double fc, double xtol, gsl_vector *x1x, gsl_vector *dx1x, gsl_vector *x2x, gsl_vector *dx2x, gsl_vector *gradient, double *xstep, double *f, double *gnorm_u)
 Perform the minimization.

Protected Attributes

func_t * func
 User-specified function.
dfunc_t * grad
 User-specified gradient.
auto_grad_t * agrad
 Automatic gradient object.
bool grad_given
 If true, a gradient has been specified.
param_t * params
 User-specified parameter.
size_t dim
 Memory size.
alloc_t ao
 Memory allocation.
alloc_vec_t avt
 Temporary vector.
alloc_vec_t avt2

Member Function Documentation

void intermediate_point ( const gsl_vector *  x,
const gsl_vector *  px,
double  lambda,
double  pg,
double  stepa,
double  stepc,
double  fa,
double  fc,
gsl_vector *  x1x,
gsl_vector *  dx,
gsl_vector *  gradient,
double *  stepx,
double *  f 
) [inline, protected]

Line minimization.

Do a line minimisation in the region (xa,fa) (xc,fc) to find an intermediate (xb,fb) satisifying fa > fb < fc. Choose an initial xb based on parabolic interpolation

Definition at line 89 of file gsl_mmin_conf.h.

void minimize ( const gsl_vector *  x,
const gsl_vector *  xp,
double  lambda,
double  stepa,
double  stepb,
double  stepc,
double  fa,
double  fb,
double  fc,
double  xtol,
gsl_vector *  x1x,
gsl_vector *  dx1x,
gsl_vector *  x2x,
gsl_vector *  dx2x,
gsl_vector *  gradient,
double *  xstep,
double *  f,
double *  gnorm_u 
) [inline, protected]

Perform the minimization.

Starting at (x0, f0) move along the direction p to find a minimum f(x0 - lambda * p), returning the new point x1 = x0-lambda*p, f1=f(x1) and g1 = grad(f) at x1.

Definition at line 140 of file gsl_mmin_conf.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.