File view_compressed.hpp¶
-
class CompressedView¶
- #include <view_compressed.hpp>
A view that provides access to indices that have been grouped into bins.
Subclassed by BinarySparseMatrix, CompressedVector
Public Functions
-
inline CompressedView(uint32 *indices, uint32 *indptr)¶
- Parameters:
indices – A pointer to an array of type
uint32, shape(numIndices)that stores indicesindptr – A pointer to an array that stores the indices of the first element in
indicesthat corresponds to a certain bin
-
inline CompressedView(const CompressedView &other)¶
- Parameters:
other – A reference to an object of type
CompressedViewthat should be copied
-
inline CompressedView(CompressedView &&other)¶
- Parameters:
other – A reference to an object of type
CompressedViewthat should be moved
-
inline virtual ~CompressedView()¶
-
inline index_type *releaseIndices()¶
Releases the ownership of the array that stores the indices. As a result, the behavior of this view becomes undefined and it should not be used anymore. The caller is responsible for freeing the memory that is occupied by the array.
- Returns:
A pointer to the array that stores indices
-
inline index_type *releaseIndptr()¶
Releases the ownership of the array that stores the indices of the first element in
indicesthat corresponds to a certain bin. As a result, the behavior of this view becomes undefined and it should not be used anymore. The caller is responsible for freeing the memory that is occupied by the array.- Returns:
A pointer to an array that stores the indices of the first element in
indicesthat corresponds to a certain bin
-
inline CompressedView(uint32 *indices, uint32 *indptr)¶