![]() |
SCOREC core
Parallel unstructured mesh tools
|
run-time (dynamic) tensor More...
Public Member Functions | |
Tensor () | |
default constructor | |
Tensor (unsigned d) | |
construct with dimension d | |
Tensor (Tensor< T > const &b) | |
copy constructor | |
Tensor (Matrix< T > const &b) | |
copy from a matrix | |
Tensor< T > & | operator= (Tensor< T > const &b) |
assignment operator | |
Tensor< T > | operator= (Matrix< T > const &b) |
assignent to a matrix | |
Tensor< T > | operator+ (Tensor< T > const &b) |
add a tensor to a tensor | |
Tensor< T > | operator- (Tensor< T > const &b) |
subtract a tensor from a tensor | |
Tensor< T > | operator* (Tensor< T > const &b) |
multiply a tensor by a tensor | |
Tensor< T > | operator* (T const &s) |
multiply a tensor by a scalar | |
Tensor< T > | operator/ (T const &s) |
divide a tensor by a scalar | |
void | resize (unsigned d) |
resize this tensor to dimension d More... | |
void | resize (unsigned m, unsigned n) |
resize this tensor More... | |
unsigned | dim () const |
get the dimension of this tensor | |
![]() | |
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 | |
![]() | |
Array () | |
default constructor - necessary | |
Array (Array< Vector< T, 0 >, N > const &other) | |
copy constructor | |
~Array () | |
elems is destroyed automatically | |
Array< Vector< T, 0 >, N > & | operator= (Array< Vector< T, 0 >, N > const &other) |
assignment operator | |
Vector< T, 0 > & | operator[] (unsigned i) |
mutable index operator | |
Vector< T, 0 > const & | operator[] (unsigned i) const |
immutable index operator | |
unsigned | size () const |
get the size of this array | |
run-time (dynamic) tensor
This is a silly wrapper around mth::Matrix<T> for 2x2 and 3x3 matrices that provides operator overloads like tensor * tensor that the dynamic matrix mth::Matrix<T> does not provide for performance and user safety reasons
Definition at line 28 of file mthTensor.h.
|
inline |
|
inline |
resize this tensor
this method overrides Matrix.resize(m,n) to ensure that a Tensor is not improperly resized
Definition at line 115 of file mthTensor.h.