Documentation


nr::frprmn< TraitsT > Struct Template Reference

#include <frprmn.h>

List of all members.


Detailed Description

template<class TraitsT = Old_Traits<>>
struct nr::frprmn< TraitsT >

Minimization of an n-dimensional function, using information on gradient.

The constructor performs the minimization.

Examples:

optimization_N_test.cpp.

Definition at line 15 of file frprmn.h.

Public Types

typedef TraitsT Traits
 Traits.

typedef Traits::Real Real
 Floating point value.

typedef Traits::Vector Vector
 Vector.


Public Member Functions

Constructor
template<class Func, class DFunc>  frprmn (Vector &p, unsigned int n, Real ftol, unsigned int *iter, Real *fret, Func *funct, DFunc *gradient, unsigned int ITMAX=200, Real TOL=2.0e-4, Real EPS=1.0e-10)
 Given a starting point p[0..n-1], Fletcher-Reeves-Polak-Ribiere minimization is performed on a function funct, using its gradient calculated by a routine gradient.


Member Typedef Documentation

template<class TraitsT = Old_Traits<>>
typedef Traits::Real nr::frprmn< TraitsT >::Real
 

Floating point value.

Definition at line 21 of file frprmn.h.

template<class TraitsT = Old_Traits<>>
typedef TraitsT nr::frprmn< TraitsT >::Traits
 

Traits.

Definition at line 19 of file frprmn.h.

template<class TraitsT = Old_Traits<>>
typedef Traits::Vector nr::frprmn< TraitsT >::Vector
 

Vector.

Definition at line 23 of file frprmn.h.


Constructor & Destructor Documentation

template<class TraitsT = Old_Traits<>>
template<class Func, class DFunc>
nr::frprmn< TraitsT >::frprmn Vector p,
unsigned int  n,
Real  ftol,
unsigned int iter,
Real fret,
Func *  funct,
DFunc *  gradient,
unsigned int  ITMAX = 200,
Real  TOL = 2.0e-4,
Real  EPS = 1.0e-10
[inline]
 

Given a starting point p[0..n-1], Fletcher-Reeves-Polak-Ribiere minimization is performed on a function funct, using its gradient calculated by a routine gradient.

The convergence tolerance of the function value is input as ftol. Returned quantities are p (the location of the minimum), iter (the number of iterations that were performed), and fret (the minimum value of the function). The routine linmin is used to perform line minimizations. The routine dlinmin can be used instead by switching comments in the code. Template parameter Func must be similar with Real( vector ). Template parameter DFunc must be similar with void( vector location, vector gradient ).

Definition at line 37 of file frprmn.h.


The documentation for this struct was generated from the following file:
Generated on Thu Dec 23 13:52:34 2004 by doxygen 1.3.6