|
NTLib - Number Theory Library 0.9
|
Represents a matrix with a given number of rows and colums. More...
Public Member Functions | |
| matrix ()=default | |
| Creates new matrix. | |
| matrix (const std::initializer_list< std::initializer_list< T > > &elements) | |
| Constructs a new matrix from a given 2D initializer list. | |
| decltype(auto) | operator[] (this auto &self, std::size_t r, std::size_t c) |
| Two dimensional array subscript operator. | |
| matrix & | operator+= (const matrix &rhs) |
| Compound plus operator for matrix addition. | |
| matrix & | operator-= (const matrix &rhs) |
| Compound minus operator for matrix subtraction. | |
| matrix & | operator*= (T rhs) |
| Compound times operator for right scalar multiplication. | |
| matrix & | operator/= (T rhs) |
| Compound divides operator for scalar division. | |
| matrix & | operator%= (T rhs) |
| Compound modulo operator for elementwise modulo by a scalar. | |
| matrix & | operator*= (const matrix &rhs) |
| Compound times operator for matrix multiplication. | |
Static Public Member Functions | |
| static matrix | get_zero () |
| Returns a zero matrix. | |
| static matrix | get_identity () |
| Returns a square identity matrix. | |
Friends | |
| bool | operator== (const matrix &, const matrix &)=default |
| Default equality operator. | |
Represents a matrix with a given number of rows and colums.
| ROWS | The number of rows. |
| COLUMS | The number of colums. |
| T | The element type. |
|
default |
Creates new matrix.
Elements will be default initialized.
|
inline |
Constructs a new matrix from a given 2D initializer list.
The 2D initializer list shall be a list of lines.
| elements | The elements of the matrix. |
|
inlinestatic |
Returns a square identity matrix.
|
inlinestatic |
Returns a zero matrix.
|
inline |
Compound modulo operator for elementwise modulo by a scalar.
| rhs | The divisor. A scalar. |
|
inline |
Compound times operator for matrix multiplication.
| rhs | The second factor. |
|
inline |
Compound times operator for right scalar multiplication.
| rhs | The second factor. A scalar. |
|
inline |
Compound plus operator for matrix addition.
| rhs | The second summand. |
|
inline |
Compound minus operator for matrix subtraction.
| rhs | The subtrahend. |
|
inline |
Compound divides operator for scalar division.
| rhs | The divisor. A scalar. |
|
inline |
Two dimensional array subscript operator.
| self | Explicity object parameter. |
| r | The row. |
| c | The column. |
|
friend |
Default equality operator.