Go to the documentation of this file.
28 #ifndef SCIMATH_LSQMATRIX_H
29 #define SCIMATH_LSQMATRIX_H
32 #include <casacore/casa/aips.h>
34 #include <casacore/casa/Utilities/RecordTransformable.h>
void mulDiagonal_pub(uInt n, Double fac)
Multiply n-length of diagonal with 1+fac
void decRow_pub(Double *&row, uInt i) const
Bool fromRecord(String &error, const RecordInterface &in)
Create a Matrix from a record.
void toAipsIO(AipsIO &out) const
static void putCArray(AipsIO &out, uInt len, const uInt *const in)
static void putCArray(AipsIO &out, uInt len, const Double *const in)
Double operator[](uInt index) const
void incRow_pub(Double *&row, uInt i) const
Get next row or previous row pointer in normal equation if the pointer row is at row i.
static Bool putCArray(String &error, RecordInterface &out, const String &fname, uInt len, const Double *const in)
Convert a carray to/from a record.
void doDiagonal_pub(uInt n)
Make diagonal element 1 if zero (Note that this is always called when invert() is called).
void deinit()
De-initialise matrix.
Double * trian_p
Matrix (triangular n_p * n_p)
uInt len_p
Derived sizes (all 0 if n_p equals 0)
static Bool getCArray(String &error, const RecordInterface &in, const String &fname, uInt len, uInt *&out)
Double * diag_pub(uInt i) const
Get diagonal element pointer [i][i]
uInt nrows_pub() const
Get number of rows.
uInt nelements_pub() const
Get length of triangular array.
static Bool getCArray(String &error, const RecordInterface &in, const String &fname, uInt len, Double *&out)
Double maxDiagonal_pub(uInt n)
Determine max of abs values of n-length of diagonal.
void addDiagonal_pub(uInt n, Double fac)
Add fac to n-length of diagonal.
void clear()
Clear matrix.
uInt nrows() const
Get number of rows.
static void getCArray(AipsIO &in, uInt len, uInt *&out)
Double * row(uInt i) const
Get row pointer in normal equation (points to element [i][0])
void reset()
Reset all data to zero.
void mulDiagonal(uInt n, Double fac)
Multiply n-length of diagonal with 1+fac
uInt nelements() const
Get length of triangular array.
LSQMatrix & operator=(const LSQMatrix &other)
Assignment (deep copy)
uInt n_p
Matrix size (linear size)
void addDiagonal(uInt n, Double fac)
Add fac to n-length of diagonal.
static void getCArray(AipsIO &in, uInt len, Double *&out)
static const String tmatsiz
Record field names.
Bool toRecord(String &error, RecordInterface &out) const
Create a record from an LSQMatrix.
void incRow(Double *&row, uInt i) const
Get next row or previous row pointer in normal equation if the pointer row is at row i.
void doDiagonal(uInt n)
Make diagonal element 1 if zero (Note that this is always called when invert() is called).
this file contains all the compiler specific defines
void init()
Initialise matrix.
static Bool putCArray(String &error, RecordInterface &out, const String &fname, uInt len, const uInt *const in)
Double * diag(uInt i) const
Get diagonal element pointer [i][i]
void fromAipsIO(AipsIO &in)
Save or restore using AipsIO.
LSQMatrix(const LSQMatrix &other)
Copy constructor (deep copy)
void copy(const LSQMatrix &other)
Copy data.
Double & operator[](uInt index)
Index an element in the triangularised matrix.
Double * row_pub(uInt i) const
A set of public interface functions.
String: the storage and methods of handling collections of characters.
void decRow(Double *&row, uInt i) const
bool Bool
Define the standard types used by Casacore.
LSQMatrix()
Default constructor (empty, only usable after a set(n))
void set(uInt n)
Set new sizes (default is for Real, a Bool argument will make it complex)
LSQMatrix(uInt n)
Construct an object with the number of rows and columns indicated.
Double maxDiagonal(uInt n)
Determine max of abs values of n-length of diagonal.
static const String tmatdat
const String & ident() const
Get identification of record.