casacore
|
#include <NNLSMatrixSolver.h>
Public Member Functions | |
NNLSMatrixSolver () | |
Default Constructor. More... | |
NNLSMatrixSolver (const NNLSMatrixSolver &other) | |
Copy Constructor. More... | |
NNLSMatrixSolver (const Matrix< FType > &A, const Vector< FType > &B) | |
Create a NNLSMatrixSolver from a matrix A and a Vector B Warning: A and B are accessed by reference, so don't modify them during the lifetime of the NNLSMatrixSolver More... | |
~NNLSMatrixSolver () | |
Destructor. More... | |
Bool | solve () |
Solve for the X vector. More... | |
Public Member Functions inherited from casacore::MatrixSolver | |
MatrixSolver () | |
Default Constructor. More... | |
MatrixSolver (const MatrixSolver &other) | |
Copy Constructor. More... | |
MatrixSolver (const Matrix< FType > &A, const Vector< FType > &B) | |
Create a MatrixSolver from a matrix A and a Vector B Warning: A and B are accessed by reference, so do not modify them during the lifetime of the MatrixSolver More... | |
virtual | ~MatrixSolver () |
Virtual destructor: calls all derived class destructors. More... | |
MatrixSolver & | operator= (const MatrixSolver &other) |
Assignment operator: uses reference semantics, i.e., it references the internal arrays of other. More... | |
void | setAB (const Matrix< FType > &A, const Vector< FType > &B) |
Set A matrix and B vector. More... | |
void | setX (const Vector< FType > &X) |
Set initial value of X. More... | |
Bool | accurateSolution () |
Is the current solution good enough? More... | |
const Vector< FType > & | getResidual () |
Return residual vector B-AX. More... | |
const Vector< FType > & | getSolution () |
Return solution vector. More... | |
void | setTolerance (FType tol) |
Set the tolerance for solution. More... | |
FType | Tolerance () |
Return the tolerance for solution. More... | |
void | setMaxIters (uInt maxiters) |
Set the maximum number of iterations. More... | |
uInt | MaxIters () |
Return the maximum number of iterations. More... | |
void | setGain (FType g) |
Set the gain for solution. More... | |
FType | Gain () |
Return the gain for solution. More... | |
void | setSolved (Bool s) |
Set status of solution. More... | |
Bool | Solved () |
Return status of solution. More... | |
FType | getNorm () |
Return norm of solution i.e. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from casacore::MatrixSolver | |
virtual LogSink & | logSink () |
Protected Attributes inherited from casacore::MatrixSolver | |
LogSink | logSink_p |
Matrix< FType > | AMatrix |
the A matrix data member More... | |
Vector< FType > | BVector |
the constraint vector data member More... | |
Vector< FType > | RVector |
The residual vector data member. More... | |
Vector< FType > | XVector |
The solution vector data member. More... | |
FType | RNorm |
The solution norm i.e. More... | |
FType | BNorm |
The data norm i.e. More... | |
NNLSMatrixSolver.h: the base class for NNLS solvers of linear equations AX=B
Internal
NNLS stands for Projection Onto Convex Sets. The idea is very simple: to find a solution to AX=B simply take the residual vector B-AX and operate on it to keep only the bits that obey some constraint e.g. positivity. Add this part to the current estimate of the solution vector and iterate. Both CLEAN and Gerchberg-Saxon are NNLS algorithms. If the projection Operators are convex then the process is guaranteed to converge (Youla, 1970).
NNLSMatrixSolver is a complete class. To use it, simply add Operators
NNLSMatrixSolver NNLS(amatrix, bvector);NNLS.addOperator(foo);
Definition at line 71 of file NNLSMatrixSolver.h.
casacore::NNLSMatrixSolver::NNLSMatrixSolver | ( | ) |
Default Constructor.
casacore::NNLSMatrixSolver::NNLSMatrixSolver | ( | const NNLSMatrixSolver & | other | ) |
Copy Constructor.
casacore::NNLSMatrixSolver::NNLSMatrixSolver | ( | const Matrix< FType > & | A, |
const Vector< FType > & | B | ||
) |
Create a NNLSMatrixSolver from a matrix A and a Vector B
Warning: A and B are accessed by reference, so don't modify them during the lifetime of the NNLSMatrixSolver
casacore::NNLSMatrixSolver::~NNLSMatrixSolver | ( | ) |
Destructor.
|
virtual |
Solve for the X vector.
Reimplemented from casacore::MatrixSolver.