|
Public Types |
typedef int | size_t |
Public Member Functions |
| matrix () |
| Default constructor.
|
| matrix (const matrix<T, nR, nC>& src) |
| Copy constructor.
|
virtual | ~matrix () |
| Destructor.
|
matrix<T, nR, nC> | operator+ (const matrix<T, nR, nC>& rhs) const |
| The matrix addition operator.
|
matrix<T, nR, nC>& | operator+= (const matrix<T, nR, nC>& rhs) |
| The in place matrix addition operator.
|
matrix<T, nR, nC> | operator- () |
| The unary operator.
|
matrix<T, nR, nC> | operator- (const matrix<T, nR, nC>& rhs) const |
| The matrix subtraction operator.
|
matrix<T, nR, nC>& | operator-= (const matrix<T, nR, nC>& rhs) |
| The in place matrix subtraction operator.
|
matrix<T, nR, nC>& | operator*= (int scale) |
| The in place scalar multiplication operator.
|
matrix<T, nR, nC>& | operator*= (float scale) |
| The in place scalar multiplication operator.
|
matrix<T, nR, nC>& | operator*= (double scale) |
| The in place scalar multiplication operator.
|
matrix<T, nR, nC> | operator* (int scale) const |
| The scalar multiplication operator.
|
matrix<T, nR, nC> | operator* (float scale) const |
| The scalar multiplication operator.
|
matrix<T, nR, nC> | operator* (double scale) const |
| The scalar multiplication operator.
|
matrix<T, nR, nC>& | operator/= (int scale) |
| The in place scalar division operator.
|
matrix<T, nR, nC>& | operator/= (float scale) |
| The in place scalar division operator.
|
matrix<T, nR, nC>& | operator/= (double scale) |
| The in place scalar division operator.
|
matrix<T, nR, nC> | operator/ (int scale) const |
| The scalar division operator.
|
matrix<T, nR, nC> | operator/ (float scale) const |
| The scalar division operator.
|
matrix<T, nR, nC> | operator/ (double scale) const |
| The scalar division operator.
|
T& | operator() (size_t row, size_t col) |
| Get the element of the matrix (lvalue).
|
T | operator() (size_t row, size_t col) const |
| Get the element of the matrix (rvalue).
|
template<int nC2> |
matrix<T, nR, nC2> | operator* (const matrix<T, nC, nC2>& b) |
| Matrix multiplication function.
|
matrix<T, nR, nC>& | operator= (const matrix<T, nR, nC>& src) |
| The assignment operator.
|
size_t | numRow () const |
| Get the number of row of this matrix.
|
size_t | numCol () const |
| Get the number of column of this matrix.
|
bool | isSquare () const |
| Is it a square matrix.
|
matrix<T, nC, nR> | transpose () const |
| Get a transpose of this matrix.
|
void | makeIdentity () |
| Make an identity matrix.
|
void | makeZero () |
| Make a zero matrix.
|
void | trim (T epsilon=EPSILON) |
| Trim the element and set it to zero if < epsilon.
|
Protected Attributes |
T | _m [nR][nC] |
Friends |
matrix<T, nR, nC> | operator* (int scale, const matrix<T, nR, nC>& rhs) |
| The scalar multiplication operator that allows the scalar value to preceed the matrix.
|
matrix<T, nR, nC> | operator* (float scale, const matrix<T, nR, nC>& rhs) |
| The scalar multiplication operator that allows the scalar value to preceed the matrix.
|
matrix<T, nR, nC> | operator* (double scale, const matrix<T, nR, nC>& rhs) |
| The scalar multiplication operator that allows the scalar value to preceed the matrix.
|
std::ostream& | operator<< (std::ostream& os, const matrix<T, nR, nC>& m) |
| The out stream operator.
|
std::istream& | operator>> (std::istream& is, matrix<T, nR, nC>& m) |
| The in stream operator.
|