VISH  0.2
Public Types | Public Member Functions
Eagle::Matrix Class Reference

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>

List of all members.

Public Types

Public Member Functions

Constructors

Arithmetic operations


Detailed Description

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.

Parameters:
Rrows
Ccolumns

The layout is given as (column,row) indexing according to a matrix A as

\[ A = \begin{pmatrix} A_{0,0} & \dots & A_{c-1,0} \\ &\dots& \\ A_{0,r-1} & \dots & A_{c-1,r-1} \end{pmatrix} \]

. 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.

See also:
LowerTriangular, Matrix, Row, Column
Examples:

Matrix.cpp.


Constructor & Destructor Documentation

template<int M, class ValueA , class ValueB >
Eagle::Matrix::Matrix ( const Matrix< R, M, ValueA > &  A,
const Matrix< M, C, ValueB > &  B,
const Operator<'*'> &   
) [inline]

Matrix multiplication $ A B$.

Test matrix multiplication!!! Optimize for row-wise contraction!

\[ M_{rc} = \Sigma_m A_{rm} B_{mc} \]

template<int M, class ValueA , class ValueB >
Eagle::Matrix::Matrix ( const Matrix< R, M, ValueA > &  A,
const Matrix< C, M, ValueB > &  B,
const Operator<'*','~'> &   
) [inline]

Transposed matrix multiplication $ A B^{\tau}$.

Test matrix multiplication!!! Optimize for row-wise contraction!

\[ M_{rc} = \Sigma_m A_{rm} B_{cm} \]

Eagle::Matrix::Matrix ( const Matrix< R, C, Value > &  A,
const LowerTriangular< C, Value > &  B,
const Mult  
) [inline]

Matrix multiplication $ A B$ 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 $ A^t B$ where B is a symmetric matrix stored in lower triangular form.

This code is UNTESTED! Verify before usage! Optimize for symmetries on the operation!


Member Function Documentation

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.


The documentation for this class was generated from the following file: