HDK
|
#include <Types.h>
Public Types | |
using | RowArray = typename std::array< S, N > |
using | Iterator = typename std::array< RowArray, N >::iterator |
using | ConstIterator = typename std::array< RowArray, N >::const_iterator |
Public Member Functions | |
MatrixN () | |
MatrixN (Uninit) | |
MatrixN (S s) | |
MatrixN (const S *begin, const S *end) | |
Comparison Operators | |
bool | operator== (const M &rhs) const |
Return true if the given matrix is identical to this one. More... | |
bool | operator!= (const M &rhs) const |
Return true if the given matrix differs from this one. More... | |
bool | isEquivalent (const M &rhs, S tolerance) const |
Indexing Operators | |
RowArray & | operator[] (size_t i) |
Return the row array at the given index. More... | |
const RowArray & | operator[] (size_t i) const |
Return the const row array at the given index. More... | |
Component-wise Operators | |
M | operator+ (const M &rhs) const |
Component-wise addition of two matrices. More... | |
MatrixN & | operator+= (const M &rhs) |
Component-wise addition of two matrices. More... | |
M | operator- (const M &rhs) const |
Component-wise subtraction of two matrices. More... | |
MatrixN & | operator-= (const M &rhs) |
Component-wise subtraction of two matrices. More... | |
M | operator* (S s) const |
Component-wise multiplication of a matrix and a scalar. More... | |
MatrixN & | operator*= (S s) |
Component-wise multiplication of a matrix and a scalar. More... | |
M | operator/ (S s) const |
Component-wise division of a matrix by a scalar. More... | |
MatrixN & | operator/= (S s) |
Component-wise division of a matrix by a scalar. More... | |
Matrix Algebra | |
M | operator* (const M &rhs) const |
Compute the matrix product. More... | |
MatrixN & | operator*= (const M &rhs) |
Compute the matrix product. More... | |
M | operator/ (const M &rhs) const |
MatrixN & | operator/= (const M &rhs) |
Iterators | |
Iterator | begin () |
ConstIterator | begin () const |
Iterator | end () |
ConstIterator | end () const |
Utility | |
S * | data () |
Return a pointer to the underlying data array. More... | |
const S * | data () const |
Return a const pointer to the underlying data array. More... | |
Static Public Member Functions | |
Static Methods | |
static constexpr size_t | numRows () |
Return the number of rows in this matrix. More... | |
static constexpr size_t | numColumns () |
Return the number of columns in this matrix. More... | |
Protected Attributes | |
std::array< RowArray, N > | _arr |
The class template for square matrices of scalar values. Inherited by Matrix33 and Matrix44.
The elements of a MatrixN are stored in row-major order, and may be accessed using the syntax matrix[row][column]
.
Template parameter M is the matrix subclass, S is the scalar element type, and N is the number of rows and columns in the matrix.
using MatrixN< M, S, N >::ConstIterator = typename std::array<RowArray, N>::const_iterator |
|
inline |
|
inline |