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
Assume real
Default constructor (empty, real, only usable after a set(nUnknowns))
Copy constructor (deep copy)
Assignment (deep copy)
Solve normal equations.
The solution will be given in sol.
Prerequisite
Etymology
From Least SQuares and aips++
Synopsis
The interface used in the LSQaips class is in terms of
aips++ Vectors directly, rather than an STL iterator (like
VectorSTLIterator) based
on it.
Example
See the tLSQaips.cc program for extensive examples.
Note: this class is in an interim state.
Motivation
The class was written to enable easy tranistion from the current Vector
to the Vector::iterator interface.
To Do
Member Description
LSQaips(uInt nUnknowns, uInt nConstraints=0) : s(nUnknowns, nConstraints)
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) : LSQFit(nUnknowns, LSQReal(), nConstraints)
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 LSQComplex &, uInt nConstraints=0) : LSQFit(nUnknowns, LSQComplex(), nConstraints)
LSQaips() : LSQFit()
LSQaips(const LSQaips &other) : LSQFit(other)
LSQaips &operator=(const LSQaips &other)
~LSQaips()
template <class U> void solve(U *sol)
template <class U> void solve(std::complex<U> *sol)
template <class U> void solve(U &sol)
template <class U> void solve(U<U> &sol)
template <class U> Bool solveLoop(Double &fit, uInt &nRank, U *sol, Bool doSVD=False)
Solve a Levenberg-Marquardt loop. Note that the solution sol
is used both and input and output. No check on the size is done.
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, U<U> &sol, Bool doSVD=False)
template <class U> Bool getCovariance(U *covar)
Get the covariance matrix. False if an error occurred
(of size nUnknowns * nUnknowns)
template <class U> Bool getCovariance(std::complex<U> *covar)
template <class U> Bool getCovariance(U<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(U<U> &errors)