Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

NonLinearLeastSquare Class Template Reference

#include <leastsquare.h>

List of all members.


Public Methods

  NonLinearLeastSquare (double accuracy=1e-4, int maxiter=100)
  Default constructor.

  NonLinearLeastSquare (double accuracy, int maxiter, QuantLib::Handle< OptimizationMethod< V > > om)
  Default constructor.

  ~NonLinearLeastSquare ()
  Destructor.

template<class M>
V & 
Perform (LeastSquareProblem< V, M > &lsProblem)
  Solve least square problem using numerix solver.

V &  results ()
  return the results.

double  residualNorm ()
  return the least square residual norm.

double  lastValue ()
  return last function value.

int  exitFlag ()
  return exit flag.

int  iterationsNumber ()
  return the performed number of iterations.


Private Attributes

results_
  solution vector.

initialValue_
  solution vector.

double  resnorm_
  least square residual norm.

int  exitFlag_
  Exit flag of the optimization process.

double  accuracy_
  required accuracy of the solver.

double  bestAccuracy_
  required accuracy of the solver.

unsigned int  maxIterations_
  maximum and real number of iterations.

unsigned int  nbIterations_
  maximum and real number of iterations.

QuantLib::Handle< OptimizationMethod<
V > > 
om_
  Optimization method.


Detailed Description

template<class V>
class NonLinearLeastSquare< V >

Default least square method using a given optimization algorithm (default is conjugate gradient).

min { r(x) : x in R^n }

where r(x) = ||f(x)||^2 the euclidian norm of f(x) for some vector-valued function f from R^n to R^m f = (f1, ..., fm) with fi(x) = bi - phi(x,ti) where bi is the vector of target data and phi is a scalar function.

Assuming the differentiability of f, the gradient of r is define by grad r(x) = f'(x)^t.f(x)

V vector class has the requirement of the previous class Handle class is need to manage pointer to optimization method

Definition at line 138 of file leastsquare.h.


The documentation for this class was generated from the following file:
Generated at Wed Nov 7 16:26:00 2001 for Optimization by doxygen1.2.9 written by Dimitri van Heesch, © 1997-2001