Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

MODEL::LineSearch Class Template Reference

#include <linesearch.h>

List of all members.

Public Types

typedef NT::number numT
typedef NT::vect vect
typedef NormFunction<dims,NT> nf
typedef NT::vf vf

Public Methods

 LineSearch (vf &fu, bool own=false)
 ~LineSearch ()
void operator() (const vect &uold, const numT fold, vect &grad, vect &p, vect &u, numT &f, numT maxstep)
bool converged (void)
nf& norm (void)
 LineSearch (const LineSearch &ls)

Static Public Attributes

const number alfa = 1e-4
const number tolerance = 1e-7

Private Attributes

vf* func
nf fmin
bool tooclose
bool owned

Detailed Description

template<integer dims, class NT = NumericTraits<number,dims>> class MODEL::LineSearch

Implements a line search for real multidim functions

Definition at line 33 of file linesearch.h.

Member Function Documentation

nf & norm ( void ) [inline]

Returns the internal NormFunction, so one can use this to calculate it without having to define an auxillary function

Definition at line 64 of file linesearch.h.

void operator() ( const vect & uold,
const numT fold,
vect & grad,
vect & p,
vect & u,
numT & f,
numT maxstep )

implements a line searching and backtracking algoritm for a real function of the <dims> variable (the norm, actually), as described in NRC.

uold   the previous point
fold   the function value
grad   the gradient
p   the newton direction (calculated from the Jacobian+LU decomposition)
u   a new point, where the function has decreased (hopefully)
f   the function value in the new point
maxstep   the largest step allowed

Definition at line 87 of file linesearch.h.

Member Data Documentation

const number alfa = 1e-4 [static]

Fraction of step to take at least

Definition at line 80 of file linesearch.h.

const number tolerance = 1e-7 [static]

Tolerance to see if the new point is too close. Usually signals convergence

Definition at line 82 of file linesearch.h.

The documentation for this class was generated from the following file:
To get the sources or tarballs, please go to SourceForge or you can use the CVS repository.

More Info? Michael Peeters. Also, check our research website:

Last update: June 2002.

Looking for Open Source? Check out SourceForge Logo !