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