casacore
scimath
Mathematics
NNLSMatrixSolver.h
Go to the documentation of this file.
1
//# NNLSMatrixSolver.h: the base class for NNLS solvers of AX=B
2
//# Copyright (C) 1994,1995,1999
3
//# Associated Universities, Inc. Washington DC, USA.
4
//#
5
//# This library is free software; you can redistribute it and/or modify it
6
//# under the terms of the GNU Library General Public License as published by
7
//# the Free Software Foundation; either version 2 of the License, or (at your
8
//# option) any later version.
9
//#
10
//# This library is distributed in the hope that it will be useful, but WITHOUT
11
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13
//# License for more details.
14
//#
15
//# You should have received a copy of the GNU Library General Public License
16
//# along with this library; if not, write to the Free Software Foundation,
17
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18
//#
19
//# Correspondence concerning AIPS++ should be addressed as follows:
20
//# Internet email: aips2-request@nrao.edu.
21
//# Postal address: AIPS++ Project Office
22
//# National Radio Astronomy Observatory
23
//# 520 Edgemont Road
24
//# Charlottesville, VA 22903-2475 USA
25
//#
26
//# $Id$
27
28
#ifndef SCIMATH_NNLSMATRIXSOLVER_H
29
#define SCIMATH_NNLSMATRIXSOLVER_H
30
31
32
#include <casacore/casa/aips.h>
33
#include <casacore/scimath/Mathematics/MatrixSolver.h>
34
35
namespace
casacore
{
//# NAMESPACE CASACORE - BEGIN
36
37
//<summary>
38
// NNLSMatrixSolver.h: the base class for NNLS solvers of linear equations AX=B
39
//</summary>
40
41
// <use visibility=local>
42
43
// <reviewed reviewer="" date="",tests="" demos="">
44
// </reviewed>
45
46
// <prerequisite>
47
// <li> Matrix, Vector
48
// </prerequisite>
49
//
50
// <etymology>
51
// NNLS stands for Projection Onto Convex Sets. The idea is very simple: to
52
// find a solution to AX=B simply take the residual vector B-AX and operate
53
// on it to keep only the bits that obey some constraint e.g. positivity.
54
// Add this part to the current estimate of the solution vector and iterate.
55
// Both CLEAN and Gerchberg-Saxon are NNLS algorithms. If the projection
56
// Operators are convex then the process is guaranteed to converge (Youla, 1970).
57
// </etymology>
58
//
59
// <synopsis>
60
// NNLSMatrixSolver is a complete class. To use it, simply add Operators
61
// <ol>
62
// <li> I do not know how to do this yet but it should look something like
63
// <src>NNLSMatrixSolver NNLS(amatrix, bvector);NNLS.addOperator(foo);</src>
64
// </ol>
65
// </synopsis>
66
//
67
// <todo asof="">
68
// <li> Add list of operators
69
// </todo>
70
71
class
NNLSMatrixSolver
:
public
MatrixSolver
{
72
public
:
73
74
// Default Constructor
75
NNLSMatrixSolver
();
76
77
// Copy Constructor
78
NNLSMatrixSolver
(
const
NNLSMatrixSolver
& other);
79
80
// Create a NNLSMatrixSolver from a matrix A and a Vector B
81
// <note role=warning> A and B are accessed by reference, so don't
82
// modify them during the lifetime of the NNLSMatrixSolver </note>
83
NNLSMatrixSolver
(
const
Matrix<FType>
& A,
const
Vector<FType>
& B);
84
85
// Destructor
86
~NNLSMatrixSolver
();
87
88
// Solve for the X vector.
89
Bool
solve
();
90
91
protected
:
92
93
private
:
94
95
};
96
97
98
}
//# NAMESPACE CASACORE - END
99
100
#endif
casacore::MatrixSolver
Definition:
MatrixSolver.h:82
casacore::Matrix< FType >
casacore::NNLSMatrixSolver
Definition:
NNLSMatrixSolver.h:71
casacore::NNLSMatrixSolver::NNLSMatrixSolver
NNLSMatrixSolver(const NNLSMatrixSolver &other)
Copy Constructor.
casacore::NNLSMatrixSolver::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,...
casacore::NNLSMatrixSolver::~NNLSMatrixSolver
~NNLSMatrixSolver()
Destructor.
casacore::NNLSMatrixSolver::NNLSMatrixSolver
NNLSMatrixSolver()
Default Constructor.
casacore::NNLSMatrixSolver::solve
Bool solve()
Solve for the X vector.
casacore::Vector< FType >
casacore
this file contains all the compiler specific defines
Definition:
mainpage.dox:28
casacore::Bool
bool Bool
Define the standard types used by Casacore.
Definition:
aipstype.h:42
Generated by
1.9.1