![]() |
Object-oriented Scientific Computing Library: Version 0.910
|
Multidimensional minimization by the Fletcher-Reeves conjugate gradient algorithm (GSL) More...
#include <gsl_mmin_conf.h>
This class performs multidimensional minimization by the Fletcher-Reeves conjugate gradient algorithm (GSL). The functions mmin() and mmin_de() minimize a given function until the gradient is smaller than the value of multi_min::tol_rel (which defaults to ).
This class has a high-level interface using mmin() or mmin_de() which automatically performs the memory allocation and minimization, or a GSL-like interface using allocate(), free(), interate() and set() or set_simplex().
See an example for the usage of this class in Multidimensional minimizer .
Default template arguments
func_t
- multi_funct< ovector_base >vec_t
- ovector_basealloc_vec_t
- ovectoralloc_t
- ovector_allocdfunc_t
- grad_funct< ovector_base >auto_grad_t
- gradient<func_t, ovector_base >def_auto_grad_t
- simple_grad<func_t, ovector_base >Note that the state variable max_iter
has not been included here, because it was not really used in the original GSL code for these minimizers.
Definition at line 401 of file gsl_mmin_conf.h.
Public Member Functions | |
virtual const char * | type () |
Return string denoting type("gsl_mmin_conf") | |
GSL-like lower level interface | |
virtual int | iterate () |
Perform an iteration. | |
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) |
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) |
Set the function and initial guess. | |
Basic usage | |
virtual int | mmin (size_t nn, vec_t &xx, double &fmin, 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, 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) | |
Protected Attributes | |
The original variables from the GSL state structure | |
int | iter |
Iteration number. | |
double | step |
Stepsize. | |
double | tol |
Tolerance. | |
alloc_vec_t | x1 |
Desc. | |
alloc_vec_t | dx1 |
Desc. | |
alloc_vec_t | x2 |
Desc. | |
double | pnorm |
Desc. | |
alloc_vec_t | p |
Desc. | |
double | g0norm |
Desc. | |
alloc_vec_t | g0 |
Desc. | |
Store the arguments to set() so we can use them for iterate() | |
alloc_vec_t | ugx |
Proposed minimum. | |
alloc_vec_t | ugg |
Gradient. | |
alloc_vec_t | udx |
Proposed step. | |
double | it_min |
Desc. |
virtual int gsl_mmin_conf< func_t, vec_t, alloc_vec_t, alloc_t, dfunc_t, auto_grad_t, def_auto_grad_t >::set | ( | vec_t & | x, |
double | u_step_size, | ||
double | tol_u, | ||
func_t & | ufunc | ||
) | [inline, virtual] |
Evaluate the function and its gradient
Definition at line 614 of file gsl_mmin_conf.h.
Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).