|
| LTMatrix () |
| Construct a new LTMatrix object. Default Constructor, call parent Matrix constructor. More...
|
|
| LTMatrix (uint16_t, uint16_t) |
| Construct a new LTMatrix object. Represent a general rectangular lower triangular matrix.
More...
|
|
| LTMatrix (uint16_t) |
| Construct a new LTMatrix object. Represent a basic square lower triangular matrix. Data are stored as follows: data[0] = l_{11}, data[1,2] = [l_{21}, l_{22}], ... More...
|
|
| LTMatrix (const LTMatrix &) |
| Construct a new LTMatrix object Copy constructor. More...
|
|
| ~LTMatrix () |
|
uint16_t | max_col_from_row (uint16_t) const |
| A method to compute the maximum colum index with non-zero data for a given row \(i\). Works for a general rectangular lower triangular matrix \(L\) of dimension \((m\times n)\) with \(m\geq n\). With C++ indexing convention, the result is given by. More...
|
|
double & | operator() (uint32_t) const |
|
double & | operator() (uint16_t, uint16_t) const |
|
LTMatrix & | operator= (const LTMatrix &) |
|
LTMatrix | operator- () const |
|
| Matrix () |
| Construct a Matrix object. Default constructor. Set number of rows and number of columns to 0. Set data pointer to NULL. More...
|
|
| Matrix (uint16_t, uint16_t) |
| Construct a Matrix object. Construct a matrix of size n rows times m columns. More...
|
|
| Matrix (const Matrix &) |
| Construct a Matrix object. Copy contructor. More...
|
|
virtual | ~Matrix () |
| Destroy the Matrix object. More...
|
|
uint16_t | get_n_rows () const |
| Accessor to the number of rows. More...
|
|
uint16_t | get_n_cols () const |
| Accessor to the number of columns. More...
|
|
uint32_t | get_n_elements () const |
| Accessor to the number of elements. More...
|
|
bool | is_square () const |
| Test if a matrix has a square shape. More...
|
|
Vector | row (uint16_t) const |
| Extract row from Matrix. More...
|
|
Vector | col (uint16_t) const |
| Extract column from Matrix. More...
|
|
double | norm1 () const |
| Compute the norm-1 of a Matrix object. For a Matrix M of dimension \(n\times m\), its norm-1 is given by the maximum colum sum (in absolute value) More...
|
|
double | normInf () const |
| Compute the norm-Infinity of a Matrix object. For a Matrix M of dimension \(n\times m\), its norm-Infinity is given by the maximum row sum (in absolute value) More...
|
|
double | normFrob () const |
| Compute the Frobenius norm of a Matrix object. For a Matrix M of dimension \(n\times m\), its Frobenius norm is given by the sum of its coefficient squared. More...
|
|
Matrix | transpose () const |
| Compute the transpose Matrix of a Matrix object. More...
|
|
double & | operator() (uint32_t) const |
| Overload operator (i) More...
|
|
double & | operator() (uint16_t, uint16_t) const |
| Overload operator (i,j). More...
|
|
Matrix & | operator= (const Matrix &) |
| Overload assignement operator. More...
|
|
Matrix & | operator+= (const Matrix &) |
| Overload operator +=. More...
|
|
Matrix & | operator-= (const Matrix &) |
| Overload operator -=. More...
|
|
Matrix | operator- () const |
| Overload unary operator -. More...
|
|
|
static double | tr (const LTMatrix &) |
|
static double | det (const LTMatrix &) |
|
static LTMatrix | zeros (uint16_t) |
|
static LTMatrix | ones (uint16_t) |
|
static LTMatrix | rand (uint16_t) |
|
static LTMatrix | rand (uint16_t, uint16_t) |
|
static Matrix | zeros (uint16_t, uint16_t) |
| Construct a matrix object of dimension n times m filled with zeros. More...
|
|
static Matrix | ones (uint16_t, uint16_t) |
| Construct a matrix object of dimension n times m filled with ones. More...
|
|
static Matrix | rand (uint16_t, uint16_t) |
| Construct a matrix object of dimension n times m filled with random values sampled from 0. to 1. More...
|
|
static Matrix | hilbert (uint16_t, uint16_t) |
| Construct an Hilbert matrix. More...
|
|
static Matrix | vandermonde (const Vector &, uint16_t) |
| Construct a Vandermonde matrix. See https://en.wikipedia.org/wiki/Vandermonde_matrix. More...
|
|
static Matrix | outer (const Vector &, const Vector &) |
| Overload operator * between two vectors to compute their outer product. More...
|
|
static Matrix | matmul (const Matrix &, MATRIX_TRANSPOSE, const Matrix &, MATRIX_TRANSPOSE) |
| Compute the product of two matrices combined with their transposition. More...
|
|
|
LTMatrix | operator* (const LTMatrix &, const LTMatrix &) |
| Product of Lower Triangular Matrices. For \(L_1\) and \(L_2\) two lower triangular matrices of dimension \((n,n)\), we have. More...
|
|
Vector | operator* (const LTMatrix &, const Vector &) |
|
LTMatrix | operator* (const double, const LTMatrix &) |
|
LTMatrix | operator* (const LTMatrix &, const double) |
|
LTMatrix | operator+ (const LTMatrix &, const LTMatrix &) |
|
LTMatrix | operator+ (const double, const LTMatrix &) |
|
LTMatrix | operator+ (const LTMatrix &, const double) |
|
LTMatrix | operator- (const LTMatrix &, const LTMatrix &) |
|
LTMatrix | operator- (const LTMatrix &, const double) |
|
LTMatrix | operator- (const double, const LTMatrix &) |
|
LTMatrix | operator/ (const LTMatrix &, const double) |
|
std::ostream & | operator<< (std::ostream &, const LTMatrix &) |
|
A class describing a Lower Triangular Matrix. Lower triangular matrix are Matrix of dimension \(n\times n\) satisfying.
\[ L_{ij} = \left\{\begin{array}{rl} 0&\textrm{if}\quad j> i \\ 0 &\textrm{otherwise} \end{array}\right. \]
- Todo:
check that calling operator L(i,j) calls the newt implementation of the at function.
Extend the definition to \(n\times m\), with \(n>m\), matrices.
uint16_t LTMatrix::max_col_from_row |
( |
uint16_t |
i | ) |
const |
A method to compute the maximum colum index with non-zero data for a given row \(i\). Works for a general rectangular lower triangular matrix \(L\) of dimension \((m\times n)\) with \(m\geq n\). With C++ indexing convention, the result is given by.
\[ j_{\max}(i)=\min(i, n-1),\quad\forall\,0\leq i< m \]
- Parameters
-
i | Row index, must be between \(0\) and \(m-1\). |
- Returns
- uint16_t \(j_{\max}(i)\) maximum index of a column with non-zeros data.
Product of Lower Triangular Matrices. For \(L_1\) and \(L_2\) two lower triangular matrices of dimension \((n,n)\), we have.
\[ (L_1L_2)_{i,j} = \sum_{k=j}^{i} (L_1)_{ik}(L_2)_{kj} ,\quad \forall\, j \leq i \]
- Parameters
-
lhs | Left hand side, a lower triangular matrix of size : \((n, n)\) |
rhs | Right hand side, a lower triangular matrix of size : \((n, n)\) |
- Returns
- LTMatrix Product lhs and rhs stored as a new lower triangular matrix object
- Warning
- lhs and rhs must be square (and thus of the same dimensions) lower triangular matrices in order for the product to make sense.