![]() |
Object-oriented Scientific Computing Library: Version 0.910
|
Base minimization routines for gsl_mmin_conf and gsl_mmin_conp. More...
#include <gsl_mmin_conf.h>
This class is used by the gsl_mmin_conf and gsl_mmin_conp minimizers to perform the line minimization along a specified direction. It is not intended for a casual end-user.
Default template arguments
func_t
- multi_funct< ovector_base >vec_t
- ovector_basealloc_vec_t
- ovectoralloc_t
- ovector_allocdfunc_t
- mm_funct< ovector_base >auto_grad_t
- gradient<func_t, ovector_base >def_auto_grad_t
- simple_grad<func_t,ovector_base > Definition at line 61 of file gsl_mmin_conf.h.
Public Member Functions | |
int | base_set (func_t &ufunc, auto_grad_t &u_def_grad) |
Set the function. | |
int | base_set_de (func_t &ufunc, dfunc_t &udfunc) |
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 ![]() | |
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 vec_t &x, const vec_t &px, double stepx, double lambda, vec_t &x1x, vec_t &dx) |
Take a step. | |
void | intermediate_point (const vec_t &x, const vec_t &px, double lambda, double pg, double stepa, double stepc, double fa, double fc, vec_t &x1x, vec_t &dx, vec_t &gradient, double *stepx, double *f) |
Line minimization. | |
void | minimize (const vec_t &x, const vec_t &xp, double lambda, double stepa, double stepb, double stepc, double fa, double fb, double fc, double xtol, vec_t &x1x, vec_t &dx1x, vec_t &x2x, vec_t &dx2x, vec_t &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. | |
size_t | dim |
Memory size. | |
alloc_t | ao |
Memory allocation. |
void gsl_mmin_base< func_t, vec_t, alloc_vec_t, alloc_t, dfunc_t, auto_grad_t, def_auto_grad_t >::intermediate_point | ( | const vec_t & | x, |
const vec_t & | px, | ||
double | lambda, | ||
double | pg, | ||
double | stepa, | ||
double | stepc, | ||
double | fa, | ||
double | fc, | ||
vec_t & | x1x, | ||
vec_t & | dx, | ||
vec_t & | gradient, | ||
double * | stepx, | ||
double * | f | ||
) | [inline, protected] |
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 105 of file gsl_mmin_conf.h.
void gsl_mmin_base< func_t, vec_t, alloc_vec_t, alloc_t, dfunc_t, auto_grad_t, def_auto_grad_t >::minimize | ( | const vec_t & | x, |
const vec_t & | xp, | ||
double | lambda, | ||
double | stepa, | ||
double | stepb, | ||
double | stepc, | ||
double | fa, | ||
double | fb, | ||
double | fc, | ||
double | xtol, | ||
vec_t & | x1x, | ||
vec_t & | dx1x, | ||
vec_t & | x2x, | ||
vec_t & | dx2x, | ||
vec_t & | gradient, | ||
double * | xstep, | ||
double * | f, | ||
double * | gnorm_u | ||
) | [inline, protected] |
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 178 of file gsl_mmin_conf.h.
Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).