casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
NNLSMatrixSolver.h
Go to the documentation of this file.
00001 //# NNLSMatrixSolver.h: the base class for NNLS solvers of AX=B
00002 //# Copyright (C) 1994,1995,1999
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //# 
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //# 
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //# 
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //# 
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id: NNLSMatrixSolver.h 19779 2006-12-12 23:20:42Z gvandiep $
00027 
00028 #ifndef SCIMATH_NNLSMATRIXSOLVER_H
00029 #define SCIMATH_NNLSMATRIXSOLVER_H
00030 
00031 
00032 #include <casa/aips.h>
00033 #include <scimath/Mathematics/MatrixSolver.h>
00034 
00035 namespace casa { //# NAMESPACE CASA - BEGIN
00036 
00037 //<summary>
00038 // NNLSMatrixSolver.h: the base class for NNLS solvers of linear equations AX=B
00039 //</summary>
00040 
00041 // <use visibility=local>
00042 
00043 // <reviewed reviewer="" date="",tests="" demos="">
00044 // </reviewed>
00045 
00046 // <prerequisite>
00047 //   <li> Matrix, Vector
00048 // </prerequisite>
00049 //
00050 // <etymology>
00051 // NNLS stands for Projection Onto Convex Sets. The idea is very simple: to
00052 // find a solution to AX=B simply take the residual vector B-AX and operate
00053 // on it to keep only the bits that obey some constraint e.g. positivity.
00054 // Add this part to the current estimate of the solution vector and iterate.
00055 // Both CLEAN and Gerchberg-Saxon are NNLS algorithms. If the projection 
00056 // Operators are convex then the process is guaranteed to converge (Youla, 1970).
00057 // </etymology>
00058 //
00059 // <synopsis> 
00060 // NNLSMatrixSolver is a complete class. To use it, simply add Operators
00061 // <ol>
00062 // <li> I do not know how to do this yet but it should look something like
00063 // <src>NNLSMatrixSolver NNLS(amatrix, bvector);NNLS.addOperator(foo);</src>
00064 // </ol>
00065 // </synopsis> 
00066 //
00067 // <todo asof="">
00068 // <li> Add list of operators
00069 // </todo>
00070 
00071 class NNLSMatrixSolver : public MatrixSolver {
00072 public:
00073 
00074   // Default Constructor
00075   NNLSMatrixSolver();
00076   
00077   // Copy Constructor
00078   NNLSMatrixSolver(const NNLSMatrixSolver & other);
00079   
00080   // Create a NNLSMatrixSolver from a matrix A and a Vector B
00081   // <note role=warning> A and B are accessed by reference, so don't 
00082   // modify them during the lifetime of the NNLSMatrixSolver </note>
00083   NNLSMatrixSolver(const Matrix<FType> & A, const Vector<FType> & B);
00084   
00085   // Destructor
00086   ~NNLSMatrixSolver();
00087   
00088   // Solve for the X vector.
00089   Bool solve();
00090   
00091 protected:
00092 
00093 private:
00094 
00095 };
00096 
00097 
00098 } //# NAMESPACE CASA - END
00099 
00100 #endif