#include <PhxMatrix.h>
Public Member Functions | |
| Matrix (const value_type *data) | |
| uint32_t | rows () const |
| uint32_t | columns () const |
| value_type | element (uint16_t row, uint16_t col) const |
| value_type & | element (uint16_t row, uint16_t col) |
| void | element (uint16_t row, uint16_t col, value_type value) |
| template<uint16_t RowRangeSize, uint16_t ColRangeSize> | |
| Matrix< RowRangeSize, ColRangeSize, value_type > | subMatrix (const Matrix< 1, RowRangeSize, uint16_t > &rowRange, const Matrix< 1, ColRangeSize, uint16_t > &colRange) |
| template<uint32_t RowRangeSize, uint32_t ColRangeSize> | |
| Matrix< RowRangeSize, ColRangeSize, value_type > | operator() (const Matrix< 1, RowRangeSize, uint16_t > &rowRange, const Matrix< 1, ColRangeSize, uint16_t > &colRange) |
| template<uint16_t RhsCols> | |
| Matrix< Rows, RhsCols, value_type > | operator * (const Matrix< Cols, RhsCols, value_type > &rhs) const |
| Matrix multiplication operator. | |
| Matrix< Rows, Cols, value_type > | operator+ (const Matrix< Rows, Cols, value_type > &rhs) const |
| Element-wise addition operator. | |
| Matrix< Rows, Cols, value_type > | operator- (const Matrix< Rows, Cols, value_type > &rhs) const |
| Element-wise subtraction operator. | |
| Matrix< Rows, Cols, value_type > | operator * (value_type s) const |
| Scalar multiplication operator. | |
| Matrix< Rows, Cols, value_type > | operator/ (value_type s) const |
| Scalar division operator. | |
| Matrix< Rows, Cols, value_type > | operator- (void) const |
| Unary negation operator. | |
| Matrix< Cols, Rows, value_type > | transpose (void) const |
| Returns the matrix transpose of this matrix. | |
| value_type * | data () |
| const value_type * | data () const |
Static Public Member Functions | |
| static Matrix< Rows, Cols, value_type > | identity () |
| Returns an "identity" matrix with dimensions given by the class's template parameters. | |
| static Matrix< Rows, Cols, value_type > | zero () |
| Returns a zero matrix with dimensions given by the class's template parameters. | |
Friends | |
| template<uint16_t Rows2, uint16_t Cols2, typename value_type2> | |
| std::ostream & | operator<< (std::ostream &os, const Matrix< Rows2, Cols2, value_type2 > &rhs) |
| template<uint16_t Rows2, uint16_t Cols2, typename value_type2> | |
| std::istream & | operator>> (std::istream &is, Matrix< Rows2, Cols2, value_type2 > &rhs) |
This template class generically supports any constant-sized matrix of values. The Rows and Cols template parameters define the size of the matrix at compile-time. Hence, the size of the matrix cannot be chosen at runtime. However, the dimensions are appropriately type-checked at compile-time where possible.
By default, the matrix contains values of type double. The value_type template parameter may be selected to allow matrices of integers or floats.
value_type parameters is not implemented. It is recommended that matrices with value type double be used for all numerical computation.
|
|||||||||
|
Returns an "identity" matrix with dimensions given by the class's template parameters.
In the case that
|
|
||||||||||
|
Scalar multiplication operator.
|
|
||||||||||||||
|
Matrix multiplication operator.
|
|
||||||||||
|
Element-wise addition operator.
|
|
||||||||||
|
Unary negation operator.
|
|
||||||||||
|
Element-wise subtraction operator.
|
|
||||||||||
|
Scalar division operator.
|
|
||||||||||
|
Returns the matrix transpose of this matrix.
|
|
|||||||||
|
Returns a zero matrix with dimensions given by the class's template parameters.
|
1.4.2