Public Member Functions

mth::Matrix< T, 0, 0 > Class Template Reference

run-time (dynamic) matrix More...

List of all members.

Public Member Functions

 Matrix ()
 default constructor - no allocation
 Matrix (unsigned m, unsigned n)
 construct m by n elements
unsigned rows () const
 get the number of rows
unsigned cols () const
 get the number of columns
void resize (unsigned m, unsigned n)
 resize to m by n elements
T & operator() (unsigned i, unsigned j)
 mutable index operator
T const & operator() (unsigned i, unsigned j) const
 immutable index operator
Matrix< T > & operator+= (Matrix< T > const &b)
 add a matrix to this matrix
Matrix< T > & operator-= (Matrix< T > const &b)
 subtract a matrix from this matrix
Matrix< T > & operator*= (T const &s)
 multiply this matrix by a scalar
Matrix< T > & operator/= (T const &s)
 divide this matrix by a scalar
void zero ()
 zero a matrix

Detailed Description

template<class T>
class mth::Matrix< T, 0, 0 >

run-time (dynamic) matrix

a runtime sized equivalent of mth::Matrix<T,M,N>. This class is meant to be used for small dense matrices whose size is not known at compile time. For large, sparse, or parallel matrices, look outside of mth.

Note that the template specialization for M=0, N=0 does not inherit from an Array of Vectors as the compile-time matrix does. Rather, a linear access model is used, where matrix elements are stored in a single dynamic array


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines