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
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.
AipsIO is the object persistency mechanism of Casacore
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)
Basic class for the least squares fitting.
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.
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 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.
Double * diag(uInt i) const
Get diagonal element pointer [i][i]
void fromAipsIO(AipsIO &in)
Save or restore using AipsIO.
void copy(const LSQMatrix &other)
Copy data.
Support class for the LSQ package.
Double & operator[](uInt index)
Index an element in the triangularised matrix.
Abstract base class for Record classes.
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)
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.