#include <gsl_mmin_conf.h>
The variable multi_min::tolf is used as the maximum value of the gradient and is be default.
The gsl iterate() function for this minimizer chooses to return GSL_ENOPROG
if the iteration fails to make progress without calling the error handler. This is presumably because the iterate() function can fail to make progress when the algorithm has succeeded in finding the minimum. I prefer to return a non-zero value from a function only in cases where the error handler will also be called, so the user is clear on what an "error" means in the local context. Thus if iterate() is failing to make progress, instead of returning a non-zero value, it sets the value of it_info to a non-zero value.
gsl_vector
to the templated vector type. This can be fixed, probably by rewriting take_step to produce a vec_t &x1 rather than a gsl_vector *x1;max_iter
has not been included here, because it was not really used in the original GSL code for these minimizers.Default template arguments
param_t
- multi_functvec_t
- ovector_viewalloc_vec_t
- ovectoralloc_t
- ovector_allocdfunc_t
- grad_functauto_grad_t
- gradientdef_auto_grad_t
- simple_grad Definition at line 384 of file gsl_mmin_conf.h.
Public Member Functions | |
virtual int | iterate () |
Perform an iteration. | |
virtual const char * | type () |
Return string denoting type("gsl_mmin_conf"). | |
virtual int | allocate (size_t n) |
Allocate the memory. | |
virtual int | free () |
Free the allocated memory. | |
int | restart () |
Reset the minimizer to use the current point as a new starting point. | |
virtual int | set (vec_t &x, double u_step_size, double tol_u, func_t &ufunc, param_t &pa) |
Set the function and initial guess. | |
virtual int | set_de (vec_t &x, double u_step_size, double tol_u, func_t &ufunc, dfunc_t &udfunc, param_t &pa) |
Set the function and initial guess. | |
virtual int | mmin (size_t nn, vec_t &xx, double &fmin, param_t &pa, func_t &ufunc) |
Calculate the minimum min of func w.r.t the array x of size nvar . | |
virtual int | mmin_de (size_t nn, vec_t &xx, double &fmin, param_t &pa, func_t &ufunc, dfunc_t &udfunc) |
Calculate the minimum min of func w.r.t the array x of size nvar . | |
Data Fields | |
double | lmin_tol |
Tolerance for the line minimization (default ![]() | |
double | step_size |
Size of the initial step (default 0.01). | |
int | it_info |
Information from the last call to iterate(). | |
Protected Attributes | |
alloc_vec_t | avt5 |
Temporary vector. | |
alloc_vec_t | avt6 |
Temporary vector. | |
alloc_vec_t | avt7 |
Temporary vector. | |
alloc_vec_t | avt8 |
Temporary vector. | |
The original variables from the GSL state structure | |
int | iter |
Desc. | |
double | step |
Desc. | |
double | tol |
Desc. | |
gsl_vector * | x1 |
Desc. | |
gsl_vector * | dx1 |
Desc. | |
gsl_vector * | x2 |
Desc. | |
double | pnorm |
Desc. | |
gsl_vector * | p |
Desc. | |
double | g0norm |
Desc. | |
gsl_vector * | g0 |
Desc. | |
Store the arguments to set() so we can use them for iterate() | |
gsl_vector * | ugx |
Desc. | |
gsl_vector * | ugg |
Desc. | |
gsl_vector * | udx |
Desc. | |
double | it_min |
Desc. |
virtual int set | ( | vec_t & | x, | |
double | u_step_size, | |||
double | tol_u, | |||
func_t & | ufunc, | |||
param_t & | pa | |||
) | [inline, virtual] |
Set the function and initial guess.
Evaluate the function and its gradient
Definition at line 688 of file gsl_mmin_conf.h.
virtual int set_de | ( | vec_t & | x, | |
double | u_step_size, | |||
double | tol_u, | |||
func_t & | ufunc, | |||
dfunc_t & | udfunc, | |||
param_t & | pa | |||
) | [inline, virtual] |
Set the function and initial guess.
Evaluate the function and its gradient
Definition at line 724 of file gsl_mmin_conf.h.
int it_info |
Information from the last call to iterate().
This is 1 if pnorm
or gnorm
are 0 and 2 if stepb
is zero.
Definition at line 464 of file gsl_mmin_conf.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