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

Constrained minimization by the projected gradient method (OOL) More...

#include <ool_mmin_pgrad.h>

Inheritance diagram for ool_mmin_pgrad< func_t, dfunc_t, vec_t, alloc_vec_t, alloc_t >:
ool_constr_mmin< func_t, dfunc_t, ool_hfunct< int >, vec_t, alloc_vec_t, alloc_t > multi_min< func_t, dfunc_t, vec_t >

Detailed Description

template<class func_t = multi_funct<>, class dfunc_t = grad_funct<>, class vec_t = ovector_base, class alloc_vec_t = ovector, class alloc_t = ovector_alloc>
class ool_mmin_pgrad< func_t, dfunc_t, vec_t, alloc_vec_t, alloc_t >

This is the simple extension of the steepest descent algorithm to constrained minimization. Each step is a line search is performed along the projected gradient direction subject to the specified constraints.

This algorithm is likely not ideal for most problems and is provided mostly for demonstration and educational purposes. Based on implementation of Kelley99 in OOL.

Default template arguments

Idea for Future:
Replace the explicit norm computation below with the more accurate dnrm2 from linalg
Idea for Future:
Replace the generic variable 'tol' with 'tolf' or 'tolx' from multi_min.

Definition at line 85 of file ool_mmin_pgrad.h.

Public Member Functions

virtual int allocate (const size_t n)
 Allocate memory.
virtual int free ()
 Free previously allocated memory.
virtual int set (func_t &fn, dfunc_t &dfn, vec_t &init)
 Set the function, the initial guess, and the parameters.
virtual int restart ()
 Restart the minimizer.
virtual int iterate ()
 Perform an iteration.
virtual int is_optimal ()
 See if we're finished.
const char * type ()
 Return string denoting type ("ool_mmin_pgrad")

Data Fields

double fmin
 Minimum function value (default $ 10^{-99} $)
double tol
 Tolerance on infinite norm.
double alpha
 Constant for the sufficient decrease condition (default $ 10^{-4} $)
double sigma1
 Lower bound to the step length reduction.
double sigma2
 Upper bound to the step length reduction.

Protected Types

typedef ool_hfunct< int > hfunc_t
 A convenient typedef for the unused Hessian product type.

Protected Member Functions

int proj (vec_t &xt)
 Project into feasible region.
int line_search ()
 Line search.

Protected Attributes

alloc_vec_t xx
 Temporary vector.

Field Documentation

template<class func_t = multi_funct<>, class dfunc_t = grad_funct<>, class vec_t = ovector_base, class alloc_vec_t = ovector, class alloc_t = ovector_alloc>
double ool_mmin_pgrad< func_t, dfunc_t, vec_t, alloc_vec_t, alloc_t >::fmin

If the function value is below this value, then the algorithm assumes that the function is not bounded and exits.

Definition at line 174 of file ool_mmin_pgrad.h.


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.