Simple wrapper class for representing a dense matrix laid out in row-major order (that is, its internal representation is a linear array of the rows).
More...
#include <dense_matrix.h>
|
using | row_iterator = typename std::vector< T >::iterator |
|
using | const_row_iterator = typename std::vector< T >::const_iterator |
|
|
std::vector< T > | storage_ |
| the underlying storage for the matrix
|
|
uint64_t | columns_ |
| the number of columns in the matrix
|
|
template<class T>
class meta::util::dense_matrix< T >
Simple wrapper class for representing a dense matrix laid out in row-major order (that is, its internal representation is a linear array of the rows).
Constructs a dense_matrix with the specified number of rows and columns.
Construction of the matrix value-initializes all elements (just as std::vector does), which ensures that elements are set to 0 when T is a numeric type.
- Parameters
-
rows | The desired number of rows |
columns | The desired number of columns |
Resizes the dense_matrix to have the specified number of rows and columns.
All elements are reset to be value initialized, not just new ones!
- Parameters
-
rows | The desired new number of rows |
columns | The desired number of columns |
Obtains the column-th element of the row-th row.
- Parameters
-
row | The row index |
column | The column index |
- Returns
- a reference to the element at that position
Obtains the column-th element of the row-th row.
- Parameters
-
row | The row index |
column | The column index |
- Returns
- a const reference to the element at that position
- Parameters
-
- Returns
- an iterator over the row-th row
- Parameters
-
- Returns
- a const iterator over the row-th row
- Parameters
-
- Returns
- an iterator to the end of the row-th row
- Parameters
-
- Returns
- an iterator to the end of the row-th row
- Returns
- the number of rows in the matrix
- Returns
- the number of columns in the matrix
The documentation for this class was generated from the following files: