File view_matrix_sparse_binary.hpp¶
-
class BinarySparseMatrix : public CompressedView, public Matrix¶
- #include <view_matrix_sparse_binary.hpp>
A two-dimensional view that provides row- or column wise access to binary values stored in a sparse matrix.
Subclassed by BinaryCscView, BinaryCsrView, SparseMatrix< T >
Public Types
Public Functions
-
inline BinarySparseMatrix(uint32 *indices, uint32 *indptr, uint32 numRows, uint32 numCols)¶
- Parameters:
indices – A pointer to an array of type
uint32, shape(numDenseElements), that stores the row or column indices of all dense elements explicitly stored in the matrixindptr – A pointer to an array of type
uint32, shape(numCols + 1)or(numRows + 1), that stores the indices of the first element inindicesthat corresponds to a certain column, ifindicesstores row indices, or row, ifindicesstores column indices. The index at the last position must be equal tonumDenseElementsnumRows – The number of rows in the view
numCols – The number of columns in the view
-
inline BinarySparseMatrix(const BinarySparseMatrix &other)¶
- Parameters:
other – A const reference to an object of type
SparseMatrixthat should be copied
-
inline BinarySparseMatrix(BinarySparseMatrix &&other)¶
- Parameters:
other – A reference to an object of type
SparseMatrixthat should be moved
-
inline virtual ~BinarySparseMatrix() override¶
-
inline BinarySparseMatrix(uint32 *indices, uint32 *indptr, uint32 numRows, uint32 numCols)¶
-
template<typename Matrix>
class IterableBinarySparseMatrixDecorator : public Matrix¶ - #include <view_matrix_sparse_binary.hpp>
Provides row- or column-wise access via iterators to the indices stored in a sparse matrix.
- Template Parameters:
Matrix – The type of the matrix
Subclassed by IterableSparseMatrixDecorator< Matrix >
Public Types
Public Functions
-
inline explicit IterableBinarySparseMatrixDecorator(typename Matrix::view_type &&view)¶
- Parameters:
view – The view, the matrix should be backed by
-
inline virtual ~IterableBinarySparseMatrixDecorator() override¶
-
inline index_const_iterator indices_cbegin(uint32 index) const¶
Returns an
index_const_iteratorto the beginning of the indices in a specific row or column of 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:
An
index_const_iteratorto the beginning of the indices
-
inline index_const_iterator indices_cend(uint32 index) const¶
Returns an
index_const_iteratorto the end of the indices in a specific row or column of 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:
An
index_const_iteratorto the end of the indices
-
inline index_iterator indices_begin(uint32 index)¶
Returns an
index_iteratorto the beginning of the indices in a specific row or column of 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:
An
index_iteratorto the beginning of the indices
-
inline index_iterator indices_end(uint32 index)¶
Returns an
index_iteratorto the end of the indices in a specific row or column of 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:
An
index_iteratorto the end of the indices