|
| constexpr | Matrix ()=default |
| | Default constructs a matrix without initializing elements.
|
| constexpr | Matrix (T value) |
| | Constructs a matrix with all elements set to a single value.
|
| constexpr | Matrix (std::initializer_list< T > values) |
| | Constructs a matrix from a flat initializer list.
|
| constexpr T & | operator() (size_t row, size_t col) |
| | < Internal storage for matrix elements.
|
| constexpr const T & | operator() (size_t row, size_t col) const |
| | Element access by (row, column).
|
| constexpr std::array< T, Cols > & | operator[] (size_t row) |
| | Row access operator.
|
| constexpr const std::array< T, Cols > & | operator[] (size_t row) const |
| | Row access operator.
|
template<typename T, size_t Rows, size_t Cols>
struct Crux::Matrix< T, Rows, Cols >
Generic fixed-size matrix container.
- Template Parameters
-
| T | Numeric element type. |
| Rows | Number of rows. |
| Cols | Number of columns. |
template<typename T, size_t Rows, size_t Cols>
| Crux::Matrix< T, Rows, Cols >::Matrix |
( |
std::initializer_list< T > | values | ) |
|
|
inlineconstexpr |
Constructs a matrix from a flat initializer list.
Elements are filled row-major. If the list has fewer elements than Rows * Cols, remaining entries are zero-initialized.
- Parameters
-
| values | Initializer list of values. |