casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
casa::LSQaips Class Reference

Interface for aips++ Vectors in least squares fitting. More...

#include <LSQaips.h>

Inheritance diagram for casa::LSQaips:
casa::LSQFit casa::GenericL2Fit< T > casa::LinearFit< T > casa::NonLinearFit< T > casa::LinearFitSVD< T > casa::NonLinearFitLM< T >

List of all members.

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)
LSQaipsoperator= (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)

Detailed Description

Interface for aips++ Vectors in least squares fitting.

Review Status

Date Reviewed:
2004/04/01

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.

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

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

Definition at line 83 of file LSQaips.h.


Constructor & Destructor Documentation

casa::LSQaips::LSQaips ( uInt  nUnknowns,
uInt  nConstraints = 0 
) [inline]

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.

Assume real

Definition at line 92 of file LSQaips.h.

casa::LSQaips::LSQaips ( uInt  nUnknowns,
const LSQReal ,
uInt  nConstraints = 0 
) [inline]

Allow explicit complex/real specification.

Definition at line 96 of file LSQaips.h.

casa::LSQaips::LSQaips ( uInt  nUnknowns,
const LSQComplex ,
uInt  nConstraints = 0 
) [inline]

Definition at line 98 of file LSQaips.h.

casa::LSQaips::LSQaips ( ) [inline]

Default constructor (empty, real, only usable after a set(nUnknowns))

Definition at line 103 of file LSQaips.h.

casa::LSQaips::LSQaips ( const LSQaips other) [inline]

Copy constructor (deep copy)

Definition at line 105 of file LSQaips.h.

Definition at line 112 of file LSQaips.h.


Member Function Documentation

template<class U >
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().

template<class U >
Bool casa::LSQaips::getCovariance ( std::complex< U > *  covar) [inline]

Reimplemented from casa::LSQFit.

Definition at line 172 of file LSQaips.h.

References getCovariance().

template<class U >
Bool casa::LSQaips::getCovariance ( Array< U > &  covar)
template<class U >
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().

template<class U >
Bool casa::LSQaips::getErrors ( std::complex< U > *  errors) [inline]

Reimplemented from casa::LSQFit.

Definition at line 183 of file LSQaips.h.

References getErrors().

template<class U >
Bool casa::LSQaips::getErrors ( U &  errors) [inline]

Reimplemented from casa::LSQFit.

Definition at line 186 of file LSQaips.h.

References getErrors().

template<class U >
Bool casa::LSQaips::getErrors ( Vector< U > &  errors) [inline]
LSQaips& casa::LSQaips::operator= ( const LSQaips other) [inline]

Assignment (deep copy)

Definition at line 107 of file LSQaips.h.

template<class U >
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().

template<class U >
void casa::LSQaips::solve ( std::complex< U > *  sol) [inline]

Reimplemented from casa::LSQFit.

Definition at line 123 of file LSQaips.h.

References solve().

template<class U >
void casa::LSQaips::solve ( U &  sol) [inline]

Reimplemented from casa::LSQFit.

Definition at line 125 of file LSQaips.h.

References solve().

template<class U >
void casa::LSQaips::solve ( Vector< U > &  sol) [inline]
template<class U >
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().

template<class U >
Bool casa::LSQaips::solveLoop ( uInt nRank,
std::complex< U > *  sol,
Bool  doSVD = False 
) [inline]

Reimplemented from casa::LSQFit.

Definition at line 139 of file LSQaips.h.

References solveLoop().

template<class U >
Bool casa::LSQaips::solveLoop ( uInt nRank,
U &  sol,
Bool  doSVD = False 
) [inline]

Reimplemented from casa::LSQFit.

Definition at line 143 of file LSQaips.h.

References solveLoop().

template<class U >
Bool casa::LSQaips::solveLoop ( uInt nRank,
Vector< U > &  sol,
Bool  doSVD = False 
)
template<class U >
Bool casa::LSQaips::solveLoop ( Double fit,
uInt nRank,
U *  sol,
Bool  doSVD = False 
) [inline]

Reimplemented from casa::LSQFit.

Definition at line 150 of file LSQaips.h.

References solveLoop().

template<class U >
Bool casa::LSQaips::solveLoop ( Double fit,
uInt nRank,
std::complex< U > *  sol,
Bool  doSVD = False 
) [inline]

Reimplemented from casa::LSQFit.

Definition at line 154 of file LSQaips.h.

References solveLoop().

template<class U >
Bool casa::LSQaips::solveLoop ( Double fit,
uInt nRank,
U &  sol,
Bool  doSVD = False 
) [inline]

Reimplemented from casa::LSQFit.

Definition at line 158 of file LSQaips.h.

References solveLoop().

template<class U >
Bool casa::LSQaips::solveLoop ( Double fit,
uInt nRank,
Vector< U > &  sol,
Bool  doSVD = False 
)

The documentation for this class was generated from the following file: