LeastSquareFunction Class Reference

#include <leastsquare.hpp>

Inheritance diagram for LeastSquareFunction:

Inheritance graph
[legend]
List of all members.

Detailed Description

Design a least square function as a cost function using the interface provided by LeastSquareProblem class. Array vector class requires function DotProduct() that computes dot product and - operator. M matrix class requires function transpose() that computes transpose and * operator with vector class.


Public Member Functions

 LeastSquareFunction (LeastSquareProblem &lsp)
 Default constructor.

virtual ~LeastSquareFunction ()
 Destructor.

virtual double value (const Array &x) const
 compute value of the least square function

virtual void gradient (Array &grad_f, const Array &x) const
 compute vector of derivatives of the least square function

virtual double valueAndGradient (Array &grad_f, const Array &x) const
 compute value and gradient of the least square function


Protected Attributes

LeastSquareProblemlsp_
 least square problem


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

QuantLib.org
QuantLib
Hosted by
SourceForge.net Logo
Documentation generated by
doxygen