|
template<typename O > |
| Matrix (Matrix< O, N, M > const &other) |
| Copy ctor from matrix of different type.
|
|
| Matrix (Matrix< T, N, M > const &other) |
| Copy ctor from matrix of same type.
|
|
| Matrix (T const &value) |
| Ctor that initializes ALL elements.
|
|
| Matrix (T const *values) |
| Ctor taking a pointer to initialize values.
|
|
| Matrix (void) |
| Default ctor that leaves values uninitialized.
|
|
T * | begin (void) |
|
T const * | begin (void) const |
|
Vector< T, N > | col (int index) const |
| Returns a column of the matrix as vector.
|
|
Matrix< T, N, M-1 > | delete_col (int index) const |
| Returns a new matrix with the specified column deleted.
|
|
Matrix< T, N-1, M > | delete_row (int index) const |
| Returns a new matrix with the specified row deleted.
|
|
T * | end (void) |
|
T const * | end (void) const |
|
Matrix< T, N, M > & | fill (T const &value) |
| Fills all vector elements with the given value.
|
|
template<int O> |
Matrix< T, N, M+O > | hstack (Matrix< T, N, O > const &other) const |
| Stacks this (left) and another matrix (right) horizontally.
|
|
Matrix< T, N, M+1 > | hstack (Vector< T, N > const &other) const |
| Stacks this matrix (left) and another vector (right) horizontally.
|
|
bool | is_similar (Matrix< T, N, M > const &other, T const &epsilon) const |
| Component-wise similarity using epsilon checks.
|
|
bool | is_square (void) const |
| Tests if the matrix is square.
|
|
T | maximum (void) const |
| Returns the largest element in the matrix.
|
|
T | minimum (void) const |
| Returns the smallest element in the matrix.
|
|
template<int U> |
Matrix< T, N, U > | mult (Matrix< T, M, U > const &rhs) const |
| Matrix with matrix multiplication.
|
|
Vector< T, N > | mult (Vector< T, M > const &rhs) const |
| Matrix with vector multiplication.
|
|
Vector< T, N-1 > | mult (Vector< T, M-1 > const &rhs, T const &v) const |
| Matrix with smaller vector multiplication.
|
|
Matrix< T, N, M > & | negate (void) |
| Component-wise negation on self, returns self.
|
|
Matrix< T, N, M > | negated (void) const |
| Returns a component-wise negation on copy of self.
|
|
bool | operator!= (Matrix< T, N, M > const &rhs) const |
| Comparison operator.
|
|
T & | operator() (int row, int col) |
| Element access operator.
|
|
T const & | operator() (int row, int col) const |
| Const element access operator.
|
|
template<int U> |
Matrix< T, N, U > | operator* (Matrix< T, M, U > const &rhs) const |
| Multiplication with other matrix.
|
|
Matrix< T, N, M > | operator* (T const &rhs) const |
| Component-wise multiplication with scalar.
|
|
Vector< T, N > | operator* (Vector< T, M > const &rhs) const |
| Multiplication with other vector.
|
|
T * | operator* (void) |
| Dereference operator to value array.
|
|
T const * | operator* (void) const |
| Const dereference operator to value array.
|
|
Matrix< T, N, M > & | operator*= (T const &rhs) |
| Component-wise self-multiplication with scalar.
|
|
Matrix< T, N, M > | operator+ (Matrix< T, N, M > const &rhs) const |
| Addition with other matrix.
|
|
Matrix< T, N, M > | operator+ (T const &rhs) const |
| Component-wise addition with scalar.
|
|
Matrix< T, N, M > & | operator+= (Matrix< T, N, M > const &rhs) |
| Self-addition with other matrix.
|
|
Matrix< T, N, M > & | operator+= (T const &rhs) |
| Component-wise self-addition with scalar.
|
|
Matrix< T, N, M > | operator- (Matrix< T, N, M > const &rhs) const |
| Substraction with other matrix.
|
|
Matrix< T, N, M > | operator- (T const &rhs) const |
| Component-wise substraction with scalar.
|
|
Matrix< T, N, M > | operator- (void) const |
| Component-wise negation.
|
|
Matrix< T, N, M > & | operator-= (Matrix< T, N, M > const &rhs) |
| Self-substraction with other matrix.
|
|
Matrix< T, N, M > & | operator-= (T const &rhs) |
| Component-wise self-substraction with scalar.
|
|
Matrix< T, N, M > | operator/ (T const &rhs) const |
| Component-wise division by scalar.
|
|
Matrix< T, N, M > & | operator/= (T const &rhs) |
| Component-wise self-division by scalar.
|
|
template<typename O > |
Matrix< T, N, M > & | operator= (Matrix< O, N, M > const &rhs) |
| Assignment operator from different type.
|
|
Matrix< T, N, M > & | operator= (Matrix< T, N, M > const &rhs) |
| Assignment operator.
|
|
bool | operator== (Matrix< T, N, M > const &rhs) const |
| Comparison operator.
|
|
T & | operator[] (unsigned int i) |
| Element linear access operator.
|
|
T const & | operator[] (unsigned int i) const |
| Const element linear access operator.
|
|
Vector< T, M > | row (int index) const |
| Returns a row of the matrix as vector.
|
|
Matrix< T, M, N > & | transpose (void) |
| Transpose the current matrix.
|
|
Matrix< T, M, N > | transposed (void) const |
| Returns a transposed copy of self by treating rows as columns.
|
|
template<int O> |
Matrix< T, N+O, M > | vstack (Matrix< T, O, M > const &other) const |
| Stacks this (top) and another matrix (bottom) vertically.
|
|
Matrix< T, N+1, M > | vstack (Vector< T, M > const &other) const |
| Stacks this matrix (top) and another vector (bottom) vertically.
|
|
template<typename T, int N, int M>
class math::Matrix< T, N, M >
Matrix class for arbitrary dimensions and types.
This class uses conventions from mathematics:
Type: Matrix<T,ROWS,COLS> Access: M(row, col)
E.g., a matrix with 3 rows and 4 columns has type Matrix<T,3,4>. The lower right element is accessed with M(2,3);
Definition at line 53 of file matrix.h.