casa
$Rev:20696$
|
Interface for aips++ Vectors in least squares fitting. More...
#include <LSQaips.h>
Public Member Functions | |
LSQaips (uInt nUnknowns, uInt nConstraints=0) | |
Construct an object with the number of unknown, knowns and constraints, and type, using the default collinearity factor and the default Levenberg-Marquardt adjustment factor. | |
LSQaips (uInt nUnknowns, const LSQReal &, uInt nConstraints=0) | |
Allow explicit complex/real specification. | |
LSQaips (uInt nUnknowns, const LSQComplex &, uInt nConstraints=0) | |
LSQaips () | |
Default constructor (empty, real, only usable after a set(nUnknowns)) | |
LSQaips (const LSQaips &other) | |
Copy constructor (deep copy) | |
LSQaips & | operator= (const LSQaips &other) |
Assignment (deep copy) | |
~LSQaips () | |
template<class U > | |
void | solve (U *sol) |
Solve normal equations. | |
template<class U > | |
void | solve (std::complex< U > *sol) |
template<class U > | |
void | solve (U &sol) |
template<class U > | |
void | solve (Vector< U > &sol) |
template<class U > | |
Bool | solveLoop (uInt &nRank, U *sol, Bool doSVD=False) |
Solve a Levenberg-Marquardt loop. | |
template<class U > | |
Bool | solveLoop (uInt &nRank, std::complex< U > *sol, Bool doSVD=False) |
template<class U > | |
Bool | solveLoop (uInt &nRank, U &sol, Bool doSVD=False) |
template<class U > | |
Bool | solveLoop (uInt &nRank, Vector< U > &sol, Bool doSVD=False) |
template<class U > | |
Bool | solveLoop (Double &fit, uInt &nRank, U *sol, Bool doSVD=False) |
template<class U > | |
Bool | solveLoop (Double &fit, uInt &nRank, std::complex< U > *sol, Bool doSVD=False) |
template<class U > | |
Bool | solveLoop (Double &fit, uInt &nRank, U &sol, Bool doSVD=False) |
template<class U > | |
Bool | solveLoop (Double &fit, uInt &nRank, Vector< U > &sol, Bool doSVD=False) |
template<class U > | |
Bool | getCovariance (U *covar) |
Get the covariance matrix. | |
template<class U > | |
Bool | getCovariance (std::complex< U > *covar) |
template<class U > | |
Bool | getCovariance (Array< U > &covar) |
template<class U > | |
Bool | getErrors (U *errors) |
Get main diagonal of covariance function (of size nUnknowns ) | |
template<class U > | |
Bool | getErrors (std::complex< U > *errors) |
template<class U > | |
Bool | getErrors (U &errors) |
template<class U > | |
Bool | getErrors (Vector< U > &errors) |
Interface for aips++ Vectors in least squares fitting.
From Least SQuares and aips++
The interface used in the LSQaips
class is in terms of aips++ Vectors directly, rather than an STL iterator (like VectorSTLIterator ) based on it.
Its functionality is identical to that of the LSQFit class, although it will be faster to use the iterator interface directly, since constructing of temporary iterators can be avoided
See the tLSQaips.cc
program for extensive examples. Note: this class is in an interim state.
The class was written to enable easy tranistion from the current Vector to the Vector::iterator interface.
casa::LSQaips::LSQaips | ( | uInt | nUnknowns, |
uInt | nConstraints = 0 |
||
) | [inline] |
casa::LSQaips::LSQaips | ( | uInt | nUnknowns, |
const LSQReal & | , | ||
uInt | nConstraints = 0 |
||
) | [inline] |
casa::LSQaips::LSQaips | ( | uInt | nUnknowns, |
const LSQComplex & | , | ||
uInt | nConstraints = 0 |
||
) | [inline] |
casa::LSQaips::LSQaips | ( | ) | [inline] |
casa::LSQaips::LSQaips | ( | const LSQaips & | other | ) | [inline] |
casa::LSQaips::~LSQaips | ( | ) | [inline] |
Bool casa::LSQaips::getCovariance | ( | U * | covar | ) | [inline] |
Get the covariance matrix.
False if an error occurred (of size nUnknowns * nUnknowns
)
Reimplemented from casa::LSQFit.
Definition at line 169 of file LSQaips.h.
Referenced by getCovariance().
Bool casa::LSQaips::getCovariance | ( | std::complex< U > * | covar | ) | [inline] |
Reimplemented from casa::LSQFit.
Definition at line 172 of file LSQaips.h.
References getCovariance().
Bool casa::LSQaips::getCovariance | ( | Array< U > & | covar | ) |
Bool casa::LSQaips::getErrors | ( | U * | errors | ) | [inline] |
Get main diagonal of covariance function (of size nUnknowns
)
Reimplemented from casa::LSQFit.
Definition at line 180 of file LSQaips.h.
Referenced by getErrors().
Bool casa::LSQaips::getErrors | ( | std::complex< U > * | errors | ) | [inline] |
Bool casa::LSQaips::getErrors | ( | U & | errors | ) | [inline] |
Bool casa::LSQaips::getErrors | ( | Vector< U > & | errors | ) | [inline] |
Definition at line 189 of file LSQaips.h.
References casa::Array< T >::data(), getErrors(), casa::LSQFit::nUnknowns(), and casa::Vector< T >::resize().
void casa::LSQaips::solve | ( | U * | sol | ) | [inline] |
Solve normal equations.
The solution will be given in sol
.
Reimplemented from casa::LSQFit.
Definition at line 121 of file LSQaips.h.
Referenced by solve().
void casa::LSQaips::solve | ( | std::complex< U > * | sol | ) | [inline] |
void casa::LSQaips::solve | ( | U & | sol | ) | [inline] |
void casa::LSQaips::solve | ( | Vector< U > & | sol | ) | [inline] |
Definition at line 127 of file LSQaips.h.
References casa::Array< T >::data(), casa::LSQFit::nUnknowns(), casa::Vector< T >::resize(), and solve().
Bool casa::LSQaips::solveLoop | ( | uInt & | nRank, |
U * | sol, | ||
Bool | doSVD = False |
||
) | [inline] |
Solve a Levenberg-Marquardt loop.
Note that the solution sol
is used both and input and output. No check on the size is done.
Reimplemented from casa::LSQFit.
Definition at line 135 of file LSQaips.h.
Referenced by solveLoop().
Bool casa::LSQaips::solveLoop | ( | uInt & | nRank, |
std::complex< U > * | sol, | ||
Bool | doSVD = False |
||
) | [inline] |
Bool casa::LSQaips::solveLoop | ( | uInt & | nRank, |
U & | sol, | ||
Bool | doSVD = False |
||
) | [inline] |
Bool casa::LSQaips::solveLoop | ( | uInt & | nRank, |
Vector< U > & | sol, | ||
Bool | doSVD = False |
||
) |
Bool casa::LSQaips::solveLoop | ( | Double & | fit, |
uInt & | nRank, | ||
Vector< U > & | sol, | ||
Bool | doSVD = False |
||
) |