QMCLineSearch Class Reference

Abstract implementation of a line search numerical optimization algorithm. More...

#include <QMCLineSearch.h>

Inheritance diagram for QMCLineSearch:

QMCOptimizationAlgorithm QMCBFGSQuasiNewtonLineSearch QMCSteepestDescent

List of all members.

Public Member Functions

 QMCLineSearch (QMCObjectiveFunction *function, QMCLineSearchStepLengthSelectionAlgorithm *stepAlg, int maxSteps, double tol)
 Constructs and initializes an instance of this class.
virtual ~QMCLineSearch ()
 Virtual destructor.
Array1D< double > optimize (Array1D< double > &initialGuess, QMCDerivativeProperties &dp, double a_diag_factor, int optStep)
 Optimize the function starting from the provided initial guess parameters.

Protected Member Functions

QMCObjectiveFunctiongetObjectiveFunction ()
 Gets the objective function for the calculation.

Protected Attributes

int dim
vector< double > f
vector< Array1D< double > > x
vector< Array1D< double > > gradient
vector< Array2D< double > > inverseHessian

Private Member Functions

Array1D< double > searchDirection ()
virtual void calculateHessian ()=0
 Calculates the search direction at x.
double stepLength (Array1D< double > &x, Array1D< double > &p, Array1D< double > &g, double f)
 Calculates the step length at x.

Private Attributes

QMCObjectiveFunctionOF
 Objective function to optimize.
QMCLineSearchStepLengthSelectionAlgorithmstepLengthAlg
 Step length determining algorithm to use.
double epsilon
 Tolerance to converge the solution to.
int maximumSteps
 Maximum number of steps allowed for the search.


Detailed Description

Abstract implementation of a line search numerical optimization algorithm.

As is standard in the field, the optimization is a minimization.

Definition at line 28 of file QMCLineSearch.h.


Constructor & Destructor Documentation

QMCLineSearch::QMCLineSearch ( QMCObjectiveFunction function,
QMCLineSearchStepLengthSelectionAlgorithm stepAlg,
int  maxSteps,
double  tol 
)

Constructs and initializes an instance of this class.

Parameters:
function objective function to optimize.
stepAlg algorithm to use claculate the step length.
maxSteps maximum number of steps to be performed during the line search.
tol tolerance to converge the solution to. Calculation is converged when $\left| 1-\frac{f(x_{i+1})}{f(x_{i})} \right| < tol $.

Definition at line 17 of file QMCLineSearch.cpp.

References dim, epsilon, maximumSteps, OF, and stepLengthAlg.

virtual QMCLineSearch::~QMCLineSearch (  )  [inline, virtual]

Virtual destructor.

Definition at line 48 of file QMCLineSearch.h.


Member Function Documentation

Array1D< double > QMCLineSearch::optimize ( Array1D< double > &  initialGuess,
QMCDerivativeProperties dp,
double  ,
int   
) [virtual]

QMCObjectiveFunction * QMCLineSearch::getObjectiveFunction (  )  [protected]

Gets the objective function for the calculation.

Definition at line 272 of file QMCLineSearch.cpp.

References OF.

Referenced by optimize().

Array1D< double > QMCLineSearch::searchDirection (  )  [private]

Definition at line 38 of file QMCLineSearch.cpp.

References calculateHessian(), dim, gradient, and inverseHessian.

Referenced by optimize().

virtual void QMCLineSearch::calculateHessian (  )  [private, pure virtual]

Calculates the search direction at x.

x' = x + StepLength * SearchDirection

Parameters:
x current parameter values.
g current gradient value.

Implemented in QMCBFGSQuasiNewtonLineSearch, and QMCSteepestDescent.

Referenced by searchDirection().

double QMCLineSearch::stepLength ( Array1D< double > &  x,
Array1D< double > &  p,
Array1D< double > &  g,
double  f 
) [private]

Calculates the step length at x.

x' = x + StepLength * SearchDirection

Parameters:
x current parameter values.
p current search direction.
g current gradient value.
f current objective function value.

Definition at line 29 of file QMCLineSearch.cpp.

References OF, QMCLineSearchStepLengthSelectionAlgorithm::stepLength(), and stepLengthAlg.

Referenced by optimize().


Member Data Documentation

int QMCLineSearch::dim [protected]

vector<double> QMCLineSearch::f [protected]

Definition at line 63 of file QMCLineSearch.h.

Referenced by optimize().

vector< Array1D<double> > QMCLineSearch::x [protected]

Definition at line 64 of file QMCLineSearch.h.

Referenced by QMCBFGSQuasiNewtonLineSearch::calculateHessian(), and optimize().

vector< Array1D<double> > QMCLineSearch::gradient [protected]

vector< Array2D<double> > QMCLineSearch::inverseHessian [protected]

Objective function to optimize.

Definition at line 93 of file QMCLineSearch.h.

Referenced by getObjectiveFunction(), optimize(), QMCLineSearch(), and stepLength().

Step length determining algorithm to use.

Definition at line 98 of file QMCLineSearch.h.

Referenced by QMCLineSearch(), and stepLength().

double QMCLineSearch::epsilon [private]

Tolerance to converge the solution to.

Definition at line 103 of file QMCLineSearch.h.

Referenced by optimize(), and QMCLineSearch().

Maximum number of steps allowed for the search.

Definition at line 108 of file QMCLineSearch.h.

Referenced by optimize(), and QMCLineSearch().


The documentation for this class was generated from the following files:

Generated on Sat Jul 5 16:14:04 2008 for QMcBeaver by  doxygen 1.5.6