VISH
0.2
|
Simple matrix class for performing fast operations on matrices of sizes known at compile-time. More...
#include </home/werner/origo/vish/ocean/eagle/Matrix.hpp>
Simple matrix class for performing fast operations on matrices of sizes known at compile-time.
All operations are implemented as inline functions using computational constructors, such that simple operations don't require any temporaries. However, advanced techniques like expression templates are not employed here, so complex operations will require temporary objects. The intentional use are small, fast operations with compile time check of operational consistency.
R | rows |
C | columns |
The layout is given as (column,row) indexing according to a matrix A as
. The elements are stored row-wise, such that a matrix is a collection of rows. By specification of the column it is thus possible to a view to the respective row.
Eagle::Matrix::Matrix | ( | const Matrix< R, M, ValueA > & | A, |
const Matrix< C, M, ValueB > & | B, | ||
const Operator<'*','~'> & | |||
) | [inline] |
Transposed matrix multiplication .
Test matrix multiplication!!! Optimize for row-wise contraction!
Eagle::Matrix::Matrix | ( | const Matrix< R, C, Value > & | A, |
const LowerTriangular< C, Value > & | B, | ||
const Mult & | |||
) | [inline] |
Matrix multiplication where B is a symmetric matrix stored in lower triangular form.
This code is UNTESTED! Verify before usage! Optimize for symmetries on the operation!
Eagle::Matrix::Matrix | ( | const Matrix< C, R, Value > & | A, |
const LowerTriangular< C, Value > & | B, | ||
const TransposeOperation & | , | ||
const Mult & | |||
) | [inline] |
Matrix multiplication where B is a symmetric matrix stored in lower triangular form.
This code is UNTESTED! Verify before usage! Optimize for symmetries on the operation!
Value& Eagle::Matrix::operator() | ( | int | row, |
int | column | ||
) | [inline] |
Access element for writing.
The memory layout is set up according to
M[ i+j*ROWS ] = M[i][j].
such that linear access to the elements works through the comma assignment operator:
Matrix<3,4,double> A; A = 1,0,0, 0,1,0, 0,0,1, 0,0,0;
Row<R, Value>& Eagle::Matrix::row | ( | int | column | ) | [inline] |
Return writable reference to the ith row of this matrix.
Note that the result is not a vectorized vector (and thus not of type Row<>), because it is possibly not aligned as required by a vectorized vector.
const Row<R, Value>& Eagle::Matrix::row | ( | int | column | ) | const [inline] |
Return read-only reference to the ith row of this matrix.
Note that the result is not a vectorized vector (and thus not of type Row<>), because it is possibly not aligned as required by a vectorized vector.