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: aips2-request@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//# $Id$
28
29#ifndef SCIMATH_LINEARFITSVD_H
30#define SCIMATH_LINEARFITSVD_H
31
32#include <casacore/casa/aips.h>
33#include <casacore/scimath/Fitting/LinearFit.h>
34
35namespace casacore { //# NAMESPACE CASACORE - BEGIN
36
37// <summary>
38// Linear least-squares fit using Singular Value Decomposition method.
39// </summary>
40//
41// <reviewed reviewer="wbrouw" date="2004/06/15" tests="tLinearFitSVD.cc"
42// demos="">
43// </reviewed>
44//
45// <prerequisite>
46// <li> <linkto class="LinearFit">LinearFit</linkto>
47// <li> <linkto module="Fitting">Fitting</linkto>
48// </prerequisite>
49//
50// <etymology>
51// Solves the linear least-squares fit problem using the singular value
52// decomposition method.
53// </etymology>
54//
55// <synopsis>
56// The operation, calls and results are identical to those for the
57// LinearFit class. The only difference is a collinearity default of 1e-8
58// rather than 0. The actual calculations do a singular value
59// decomposition solution. A method exists to get the constraints
60// used in solving for missing rank.
61//
62// </synopsis>
63//
64// <motivation>
65// The creation of this class was driven by the need to provide users with
66// a reliable least-squares fit method. "Numerical Recipes" recommends that
67// singular value decomposition (SVD) method be always used for linear
68// least-squares problems, because of its robustness.
69// Not everybody agrees with this.
70// </motivation>
71
72template<class T> class LinearFitSVD: public LinearFit<T>
73{
74public:
75 //# Constructors
76 // Create a fitter: the normal way to generate a fitter object. Necessary
77 // data will be deduced from the Functional provided with
78 // <src>setFunction()</src>
80 // Copy constructor (deep copy)
82 // Assignment (deep copy)
84
85 // Destructor
86 virtual ~LinearFitSVD();
87
88protected:
89 //# Make members of parent classes known.
90 using LinearFit<T>::svd_p;
92};
93
94
95} //# NAMESPACE CASACORE - END
96
97#ifndef CASACORE_NO_AUTO_TEMPLATES
98#include <casacore/scimath/Fitting/LinearFitSVD.tcc>
99#endif //# CASACORE_NO_AUTO_TEMPLATES
100#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