File view_matrix_dense.hpp¶
-
template<typename T>
class DenseMatrix : public BaseView<T>, public Matrix¶ - #include <view_matrix_dense.hpp>
A two-dimensional view that provides access to values stored in a dense matrix of a specific size.
- Template Parameters:
T – The type of the values, the view provides access to
Subclassed by CContiguousView< T >, FortranContiguousView< T >
Public Types
Public Functions
-
inline DenseMatrix(T *array, uint32 numRows, uint32 numCols)¶
- Parameters:
array – A pointer to an array of template type
Tthat stores the values, the view should provide access tonumRows – The number of rows in the view
numCols – The number of columns in the view
-
inline DenseMatrix(const DenseMatrix<T> &other)¶
- Parameters:
other – A const reference to an object of type
DenseMatrixthat should be copied
-
inline DenseMatrix(DenseMatrix<T> &&other)¶
- Parameters:
other – A reference to an object of type
DenseMatrixthat should be moved
-
inline virtual ~DenseMatrix() override¶
-
inline void clear()¶
Sets all values stored in the matrix to zero.
-
template<typename Matrix>
class DenseMatrixAllocator : public Matrix¶ - #include <view_matrix_dense.hpp>
Allocates the memory, a two-dimensional dense view provides access to.
- Template Parameters:
Matrix – The type of the view
Public Functions
-
inline DenseMatrixAllocator(uint32 numRows, uint32 numCols, bool init = false)¶
- Parameters:
numRows – The number of rows in the view
numCols – The number of columns in the view
init – True, if all elements in the view should be value-initialized, false otherwise
-
inline DenseMatrixAllocator(const DenseMatrixAllocator<Matrix> &other)¶
- Parameters:
other – A reference to an object of type
DenseMatrixAllocatorthat should be copied
-
inline DenseMatrixAllocator(DenseMatrixAllocator<Matrix> &&other)¶
- Parameters:
other – A reference to an object of type
DenseMatrixAllocatorthat should be moved
-
inline virtual ~DenseMatrixAllocator() override¶
-
template<typename Matrix>
class IterableDenseMatrixDecorator : public Matrix¶ - #include <view_matrix_dense.hpp>
Provides row- or column-wise access via iterators to the values stored in a dense matrix.
- Template Parameters:
Matrix – The type of the matrix
Public Types
Public Functions
-
inline explicit IterableDenseMatrixDecorator(typename Matrix::view_type &&view)¶
- Parameters:
view – The view, the matrix should be backed by
-
inline virtual ~IterableDenseMatrixDecorator() override¶
-
inline value_const_iterator values_cbegin(uint32 index) const¶
Returns a
value_const_iteratorto the beginning of a specific row or column in the matrix, depending on the memory layout of the view, the matrix is backed by.- Parameters:
index – The index of the row or column
- Returns:
A
value_const_iteratorto the beginning of the row or column
-
inline value_const_iterator values_cend(uint32 index) const¶
Returns a
value_const_iteratorto the end of a specific row or column in the matrix, depending on the memory layout of the view, the matrix is backed by.- Parameters:
index – The index of the row or column
- Returns:
A
value_const_iteratorto the end of the row or column
-
inline value_iterator values_begin(uint32 index)¶
Returns a
value_iteratorto the beginning of a specific row or column in the matrix, depending on the memory layout of the view, the memory is backed by.- Parameters:
index – The index of the row or column
- Returns:
A
value_iteratorto the beginning of the row or column
-
inline value_iterator values_end(uint32 index)¶
Returns a
value_iteratorto the end of a specific row or column in the matrix, depending on the memory layout of the view, the memory is backed by.- Parameters:
index – The index of the row or column
- Returns:
A
value_iteratorto the end of the row or column