LinearFitSVD.h

Classes

LinearFitSVD -- Linear least-squares fit using Singular Value Decomposition method. (full description)

template<class T> class LinearFitSVD: public LinearFit<T>

Interface

Public Members
LinearFitSVD()
LinearFitSVD(const LinearFitSVD &other)
LinearFitSVD &operator=(const LinearFitSVD &other)
virtual ~LinearFitSVD()

Description

Prerequisite

Etymology

Solves the linear least-squares fit problem using the singular value decomposition method.

Synopsis

The operation, calls and results are identical to those for the LinearFit class. The only difference is a collinearity default of 1e-8 rather than 0. The actual calculations do a singular value decomposition solution. A method exists to get the constraints used in solving for missing rank.

Motivation

The creation of this class was driven by the need to provide users with a reliable least-squares fit method. "Numerical Recipes" recommends that singular value decomposition (SVD) method be always used for linear least-squares problems, because of its robustness. Not everybody agrees with this.

Member Description

LinearFitSVD()

Create a fitter: the normal way to generate a fitter object. Necessary data will be deduced from the Functional provided with setFunction()

LinearFitSVD(const LinearFitSVD &other)

Copy constructor (deep copy)

LinearFitSVD &operator=(const LinearFitSVD &other)

Assignment (deep copy)

virtual ~LinearFitSVD()

Destructor