casacore
Loading...
Searching...
No Matches
LinearFitSVD.h
Go to the documentation of this file.
1//# LinearFitSVD.h: Linear fit using Singular Value Decomposition method.
2//#
3//# Copyright (C) 1995,1999,2000,2001,2002,2004
4//# Associated Universities, Inc. Washington DC, USA.
5//#
6//# This library is free software; you can redistribute it and/or modify it
7//# under the terms of the GNU Library General Public License as published by
8//# the Free Software Foundation; either version 2 of the License, or (at your
9//# option) any later version.
10//#
11//# This library is distributed in the hope that it will be useful, but WITHOUT
12//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14//# License for more details.
15//#
16//# You should have received a copy of the GNU Library General Public License
17//# along with this library; if not, write to the Free Software Foundation,
18//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
19//#
20//# Correspondence concerning AIPS++ should be addressed as follows:
21//# Internet email: casa-feedback@nrao.edu.
22//# Postal address: AIPS++ Project Office
23//# National Radio Astronomy Observatory
24//# 520 Edgemont Road
25//# Charlottesville, VA 22903-2475 USA
26
27#ifndef SCIMATH_LINEARFITSVD_H
28#define SCIMATH_LINEARFITSVD_H
29
30#include <casacore/casa/aips.h>
31#include <casacore/scimath/Fitting/LinearFit.h>
32
33namespace casacore { //# NAMESPACE CASACORE - BEGIN
34
35// <summary>
36// Linear least-squares fit using Singular Value Decomposition method.
37// </summary>
38//
39// <reviewed reviewer="wbrouw" date="2004/06/15" tests="tLinearFitSVD.cc"
40// demos="">
41// </reviewed>
42//
43// <prerequisite>
44// <li> <linkto class="LinearFit">LinearFit</linkto>
45// <li> <linkto module="Fitting">Fitting</linkto>
46// </prerequisite>
47//
48// <etymology>
49// Solves the linear least-squares fit problem using the singular value
50// decomposition method.
51// </etymology>
52//
53// <synopsis>
54// The operation, calls and results are identical to those for the
55// LinearFit class. The only difference is a collinearity default of 1e-8
56// rather than 0. The actual calculations do a singular value
57// decomposition solution. A method exists to get the constraints
58// used in solving for missing rank.
59//
60// </synopsis>
61//
62// <motivation>
63// The creation of this class was driven by the need to provide users with
64// a reliable least-squares fit method. "Numerical Recipes" recommends that
65// singular value decomposition (SVD) method be always used for linear
66// least-squares problems, because of its robustness.
67// Not everybody agrees with this.
68// </motivation>
69
70template<class T> class LinearFitSVD: public LinearFit<T>
71{
72public:
73 //# Constructors
74 // Create a fitter: the normal way to generate a fitter object. Necessary
75 // data will be deduced from the Functional provided with
76 // <src>setFunction()</src>
78 // Copy constructor (deep copy)
80 // Assignment (deep copy)
82
83 // Destructor
84 virtual ~LinearFitSVD();
85
86protected:
87 //# Make members of parent classes known.
88 using LinearFit<T>::svd_p;
90};
91
92
93} //# NAMESPACE CASACORE - END
94
95#ifndef CASACORE_NO_AUTO_TEMPLATES
96#include <casacore/scimath/Fitting/LinearFitSVD.tcc>
97#endif //# CASACORE_NO_AUTO_TEMPLATES
98#endif
const Double COLLINEARITY
Default collinearity test for SVD.
Bool svd_p
SVD indicator.
LinearFitSVD & operator=(const LinearFitSVD &other)
Assignment (deep copy)
virtual ~LinearFitSVD()
Destructor.
LinearFitSVD(const LinearFitSVD &other)
Copy constructor (deep copy)
LinearFitSVD()
Create a fitter: the normal way to generate a fitter object.
this file contains all the compiler specific defines
Definition mainpage.dox:28