Documentation


nr::powell< TraitsT > Struct Template Reference

#include <powell.h>

List of all members.


Detailed Description

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

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

The constructor performs the minimization.

Examples:

optimization_N_test.cpp.

Definition at line 15 of file powell.h.

Public Types

typedef TraitsT Traits
 Traits.

typedef Traits::Real Real
 Floating point value.

typedef Traits::Vector Vector
 Vector.

typedef Traits::Matrix Matrix
 Matrix.


Public Member Functions

Constructor
template<class Func>  powell (Vector &p, Matrix &xi, unsigned int n, Real ftol, unsigned int *iter, Real *fret, Func(*func), unsigned int ITMAX=200)
 Input consists of an initial starting point p[0..n-1]; an initial matrix xi[0..n-1][o..n-1], whose columns contain the initial set of directions (usually the n unit vectors); and ftol, the fractional tolerance in the function value such that failure to decrease by more than this amount on one iteration signals doneness.

template<class Func>  powell (Vector &p, unsigned int n, Real ftol, unsigned int *iter, Real *fret, Func(*func), unsigned int ITMAX=200)
 Same as previous, using identity matrix as an intial set of directions.


Member Typedef Documentation

template<class TraitsT = Old_Traits<>>
typedef Traits::Matrix nr::powell< TraitsT >::Matrix
 

Matrix.

Definition at line 24 of file powell.h.

Referenced by nr::powell< TraitsT >::powell().

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

Floating point value.

Definition at line 20 of file powell.h.

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

Traits.

Definition at line 18 of file powell.h.

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

Vector.

Definition at line 22 of file powell.h.


Constructor & Destructor Documentation

template<class TraitsT = Old_Traits<>>
template<class Func>
nr::powell< TraitsT >::powell Vector p,
Matrix xi,
unsigned int  n,
Real  ftol,
unsigned int iter,
Real fret,
Func *  func,
unsigned int  ITMAX = 200
[inline]
 

Input consists of an initial starting point p[0..n-1]; an initial matrix xi[0..n-1][o..n-1], whose columns contain the initial set of directions (usually the n unit vectors); and ftol, the fractional tolerance in the function value such that failure to decrease by more than this amount on one iteration signals doneness.

On output, p is set to the best point found, xi is the then-current direction set, fret is the returned function value at p, and iter is the number of iterations taken. The routine linmin is used. Template Func must be similar with Real( Vector )

Definition at line 34 of file powell.h.

References nr::powell< TraitsT >::Matrix, and nr::SQR().

Referenced by nr::powell< TraitsT >::powell().

template<class TraitsT = Old_Traits<>>
template<class Func>
nr::powell< TraitsT >::powell Vector p,
unsigned int  n,
Real  ftol,
unsigned int iter,
Real fret,
Func *  func,
unsigned int  ITMAX = 200
[inline]
 

Same as previous, using identity matrix as an intial set of directions.

Definition at line 100 of file powell.h.

References nr::powell< TraitsT >::Matrix, and nr::powell< TraitsT >::powell().


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