SCOREC core
Parallel unstructured mesh tools
|
compile-time (static) matrix More...
Public Member Functions | |
Matrix () | |
default constructor | |
Matrix (unsigned m, unsigned n) | |
construct with m by n elements More... | |
unsigned | rows () const |
get the number of rows | |
unsigned | cols () const |
get the number of columns | |
T & | operator() (unsigned i, unsigned j) |
mutable index operator More... | |
T const & | operator() (unsigned i, unsigned j) const |
immutable index operator More... | |
Matrix< T, M, N > | operator+ (Matrix< T, M, N > const &b) const |
add two matrices | |
Matrix< T, M, N > | operator- (Matrix< T, M, N > const &b) const |
subtract two matrices | |
Matrix< T, M, N > | operator* (T const &s) const |
multiply by a scalar | |
Matrix< T, M, N > | operator/ (T const &s) const |
divide by a scalar | |
Vector< T, M > | operator* (Vector< T, N > const &b) const |
multiply a matrix by a vector | |
template<unsigned O> | |
Matrix< T, M, O > | operator* (Matrix< T, N, O > const &b) const |
multiply two matrices More... | |
void | zero () |
zero a matrix | |
Public Member Functions inherited from can::Array< Vector< T, N >, M > | |
Array () | |
default constructor - necessary | |
Array (Array< Vector< T, N >, N > const &other) | |
copy constructor | |
~Array () | |
elems is destroyed automatically | |
Array< Vector< T, N >, N > & | operator= (Array< Vector< T, N >, N > const &other) |
assignment operator | |
Vector< T, N > & | operator[] (unsigned i) |
mutable index operator | |
Vector< T, N >const & | operator[] (unsigned i) const |
immutable index operator | |
unsigned | size () const |
get the size of this array | |
compile-time (static) matrix
Definition at line 23 of file mthMatrix.h.
|
inline |
construct with m by n elements
A dummy constructor Matrix(m,n) is provided so that dynamic and static matrices can be used interchangebly
Definition at line 31 of file mthMatrix.h.
|
inline |
mutable index operator
An index operator (i,j) is provided so that compile time matrices and runtime-sized matrices can be used interchangebly, without worrying about changing index syntax
Definition at line 40 of file mthMatrix.h.
|
inline |
immutable index operator
see the mutable index operator details
Definition at line 43 of file mthMatrix.h.
|
inline |
multiply two matrices
the extra template parameter generates code for all possible combinations of matrix sizes
Definition at line 88 of file mthMatrix.h.