28 #ifndef SCIMATH_MATRIXSOLVER_H
29 #define SCIMATH_MATRIXSOLVER_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Arrays/Array.h>
34 #include <casacore/casa/Arrays/ArrayMath.h>
35 #include <casacore/casa/Arrays/Matrix.h>
36 #include <casacore/casa/Arrays/Vector.h>
38 #include <casacore/casa/Logging/LogSink.h>
39 #include <casacore/casa/Logging/LogMessage.h>
void setAB(const Matrix< FType > &A, const Vector< FType > &B)
Set A matrix and B vector.
uInt MaxIterations
Maximum number of iterations.
MatrixSolver(const MatrixSolver &other)
Copy Constructor.
MatrixSolver()
Default Constructor.
virtual LogSink & logSink()
Bool Solved()
Return status of solution.
Vector< FType > XVector
The solution vector data member.
void setGain(FType g)
Set the gain for solution.
FType Gain()
Return the gain for solution.
virtual Bool solve()
Solve for the X vector.
FType BNorm
The data norm i.e.
Vector< FType > RVector
The residual vector data member.
MatrixSolver & operator=(const MatrixSolver &other)
Assignment operator: uses reference semantics, i.e., it references the internal arrays of other.
void setMaxIters(uInt maxiters)
Set the maximum number of iterations.
Bool accurateSolution()
Is the current solution good enough?
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,...
Matrix< FType > AMatrix
the A matrix data member
FType Tolerance()
Return the tolerance for solution.
const Vector< FType > & getSolution()
Return solution vector.
void setTolerance(FType tol)
Set the tolerance for solution.
FType getNorm()
Return norm of solution i.e.
void setSolved(Bool s)
Set status of solution.
FType SolTolerance
Tolerance for solution i.e.
const Vector< FType > & getResidual()
Return residual vector B-AX.
void setX(const Vector< FType > &X)
Set initial value of X.
FType RNorm
The solution norm i.e.
virtual ~MatrixSolver()
Virtual destructor: calls all derived class destructors.
uInt MaxIters()
Return the maximum number of iterations.
Bool solved
Has a solution been found?
Vector< FType > BVector
the constraint vector data member
this file contains all the compiler specific defines
bool Bool
Define the standard types used by Casacore.