A symmetric matrix stored in lower triangular form.
More...
#include <ocean/eagle/Matrix.hpp>
Inherits @593::Vector< value, N *(N+1)/2 >.
List of all members.
Classes
Public Types
- enum { rows = N
}
- enum { columns = N,
cols = N
}
- enum { SIZE = Vector_t::SIZE
}
The number of value elements, i.e. N*(N+1)/2.
- enum { MEMSIZE = sizeof(Base_t) / sizeof(value)
}
The number of value elements occupied in memory due to alignment.
-
typedef Vector< value, N *(N+1)/2 > Base_t
- The (vectorial) base class.
-
typedef Base_t::Vector_t Vector_t
- The compatible vector class.
Public Member Functions
-
LowerTriangular (const LowerTriangular <, const LowerTriangular &RT, const Operator<'-'> &A)
- Computational constructor for adding two types.
-
LowerTriangular (const LowerTriangular <, const LowerTriangular &RT, const Operator<'+'> &A)
- Computational constructor for adding two types.
-
LowerTriangular (const LowerTriangular <, const value &v, const Operator<'*'> &M)
- Computational constructor for scalar multiplication.
-
template<class T > LowerTriangular (const LowerTriangular< N, T > <)
- Construct from symmetric matrix of same size but different type.
-
template<class T > LowerTriangular (const Vector< T, N *(N+1)/2 > &V)
- Construct symmetric matrix from compatible vector of possibly different type.
-
LowerTriangular (const LowerTriangular <)
- Copy constructor.
-
LowerTriangular ()
- Constructor, does not initialize anything.
-
const value & operator() (int row, int column) const
- readonly Element access
-
value & operator() (int row, int column)
- read/write Element access
-
const LowerTriangular< N-1,
value > & submatrix () const
- Due to the special layout of the LowerTriangular matrix class, retrieving a reference to the lower dimensional submatrix is a no-cost operation.
-
LowerTriangular< N-1, value > & submatrix ()
- Due to the special layout of the LowerTriangular matrix class, retrieving a writeable reference to the lower dimensional submatrix is a possible operation and without runtime costs.
Static Public Member Functions
-
static int mem_index (int row, int column)
- Retrieve the linear index from row/column indices.
Detailed Description
template<int N, class value>
class LowerTriangular< N, value >
A symmetric matrix stored in lower triangular form.
For a 3x3 symmetric matrix (six independent components) we get the following layout:
0 1 3
1 2 4
3 4 5
and for a 4x4 symmetric matrix with ten components we get:
0 1 3 6
1 2 4 7
3 4 5 8
6 7 8 9
This layout ensures that the upper left submatrix of lower dimension is always contained in higher dimensional matrices. I.e. a matrix of type LowerTriangular<N> may always be casted to a matrix of type LowerTriangular<N-n> with n<N.
- Examples:
-
Matrix.cpp.
The documentation for this class was generated from the following file: