casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
casacore::NNLSMatrixSolver Class Reference

NNLSMatrixSolver.h: the base class for NNLS solvers of linear equations AX=B. More...

#include <NNLSMatrixSolver.h>

Inheritance diagram for casacore::NNLSMatrixSolver:
casacore::MatrixSolver

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...
 
MatrixSolveroperator= (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 LogSinklogSink ()
 
- Protected Attributes inherited from casacore::MatrixSolver
LogSink logSink_p
 
Matrix< FTypeAMatrix
 the A matrix data member More...
 
Vector< FTypeBVector
 the constraint vector data member More...
 
Vector< FTypeRVector
 The residual vector data member. More...
 
Vector< FTypeXVector
 The solution vector data member. More...
 
FType RNorm
 The solution norm i.e. More...
 
FType BNorm
 The data norm i.e. More...
 

Detailed Description

NNLSMatrixSolver.h: the base class for NNLS solvers of linear equations AX=B.

Intended use:

Internal

Review Status

Date Reviewed:
",

Prerequisite

Etymology

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).

Synopsis

NNLSMatrixSolver is a complete class. To use it, simply add Operators

  1. I do not know how to do this yet but it should look something like NNLSMatrixSolver NNLS(amatrix, bvector);NNLS.addOperator(foo);

To Do

Definition at line 71 of file NNLSMatrixSolver.h.

Constructor & Destructor Documentation

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.

Member Function Documentation

Bool casacore::NNLSMatrixSolver::solve ( )
virtual

Solve for the X vector.

Reimplemented from casacore::MatrixSolver.


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