|
Public Types |
|
typedef T | basicType |
| | You can always get the type of the Matrix by using typename Matrix<T>::basicType.
|
Public Member Functions |
|
| Matrix () |
| | Default constructor, will initialize Matrix dimensions to (0,0).
|
| | Matrix (const Matrix &mat, bool transpose=false) |
| | Matrix (int _rows, int _cols) |
|
virtual | ~Matrix () |
| | Destructor delete matrix data.
|
| void | resize (int _rows, int _cols) |
| T * | operator[] (int i) |
| const T * | operator[] (int i) const |
| T & | operator() (int i, int j) |
| const T & | operator() (int i, int j) const |
|
int | nrows () const |
| | returns the number of rows
|
|
int | ncols () const |
| | returns the number of cols
|
|
void | transpose () |
| | transpose the matrix (i,j) becomes (j,i), cols = rows, rows = cols.
|
| void | printOn (std::ostream &out) const |
| void | readFrom (std::istream &in=std::cin) |
| int | size () const |
|
virtual size_t | msize () const |
| | return matrix size
|
|
virtual bool | mempty () const |
| | return true if matrix empty
|
| virtual void | serialize (std::ostream &out) const |
| virtual void | unserialize (std::istream &in) |
| virtual ObjectRef | getIndex (int _row, int _col) |
| virtual void | setIndex (int _row, int _col, ObjectRef val) |
| virtual ObjectRef | clone () |
| | clone default implementation
|
|
template<> |
| ObjectRef | clone () |
Static Public Member Functions |
|
static std::string | GetClassName () |
| | returns the class name
|
Protected Attributes |
|
int | rows |
| | number of rows in the Matrix
|
|
int | cols |
| | number of cols in the Matrix
|
|
T * | data |