Object-oriented Scientific Computing Library: Version 0.910
Public Member Functions | Data Fields | Protected Attributes
gsl_mmin_bfgs2< func_t, vec_t, alloc_vec_t, alloc_t, dfunc_t, auto_grad_t, def_auto_grad_t > Class Template Reference

Multidimensional minimization by the BFGS algorithm (GSL) More...

#include <gsl_mmin_bfgs2.h>

Inheritance diagram for gsl_mmin_bfgs2< func_t, vec_t, alloc_vec_t, alloc_t, dfunc_t, auto_grad_t, def_auto_grad_t >:
multi_min< func_t, func_t, vec_t >

Detailed Description

template<class func_t = multi_funct<>, class vec_t = ovector_base, class alloc_vec_t = ovector, class alloc_t = ovector_alloc, class dfunc_t = grad_funct<ovector_base>, class auto_grad_t = gradient<func_t,ovector_base>, class def_auto_grad_t = simple_grad<func_t,ovector_base>>
class gsl_mmin_bfgs2< func_t, vec_t, alloc_vec_t, alloc_t, dfunc_t, auto_grad_t, def_auto_grad_t >

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 $ 10^{-4} $ ).

See an example for the usage of this class in Multidimensional minimizer .

This class includes the optimizations from the GSL minimizer vector_bfgs2.

Default template arguments

Todo:
While BFGS does well in the ex_mmin example with the initial guess of $ (1,0,7\pi) $ it seems to converge more poorly for the spring function than the other minimizers with other initial guesses, and I think this will happen in the GSL versions too. I need to examine this more closely with some code designed to clearly show this.

Definition at line 375 of file gsl_mmin_bfgs2.h.

Public Member Functions

virtual int iterate ()
 Perform an iteration.
virtual const char * type ()
 Return string denoting type("gsl_mmin_bfgs2")
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, the gradient, and the initial guess.
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 nn.
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 nn.

Data Fields

double step_size
 The size of the first trial step (default 0.01)
double lmin_tol
 The tolerance for the 1-dimensional minimizer.
def_auto_grad_t def_grad
 Default automatic gradient object.

Protected Attributes

gsl_mmin_linmin2 lm
 The line minimizer.
size_t dim
 Memory size.
alloc_t ao
 Memory allocation.
auto_grad_t * agrad
 Automatic gradient object.
The original variables from the GSL state structure
int iter
double step
double g0norm
double pnorm
double delta_f
double fp0
alloc_vec_t x0
alloc_vec_t g0
alloc_vec_t p
alloc_vec_t dx0
alloc_vec_t dg0
gsl_mmin_wrapper< func_t,
vec_t, alloc_vec_t, alloc_t,
dfunc_t, auto_grad_t > 
wrap
double rho
double sigma
double tau1
double tau2
double tau3
int order
Store the arguments to set() so we can use them for iterate()
vec_t * st_x
alloc_vec_t st_dx
alloc_vec_t st_grad
double st_f

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).

Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads.