File vector_dok_binary.hpp¶
Typedefs
-
using AllocatedBinaryDokVector = BinaryDokVectorAllocator<BinaryDokVector>¶
Allocates the memory, a
BinaryDokVectorprovides access to.
-
class BinaryDokVector¶
- #include <vector_dok_binary.hpp>
A view that provides access to binary values stored in a sparse vector in the dictionary of keys (DOK) format.
Subclassed by BinaryDokVectorAllocator< BinaryDokVector >
Public Types
Public Functions
-
inline explicit BinaryDokVector(std::unordered_set<uint32> *indices)¶
- Parameters:
indices – A pointer to an object of type
std::unordered_setthat stores the indices of all dense elements explicitly stored in the view
-
inline BinaryDokVector(const BinaryDokVector &other)¶
- Parameters:
other – A reference to an object of type
BinaryDokVectorthat should be copied
-
inline BinaryDokVector(BinaryDokVector &&other)¶
- Parameters:
other – A reference to an object of type
BinaryDokVectorthat should be moved
-
inline virtual ~BinaryDokVector()¶
-
inline index_const_iterator indices_cbegin() const¶
Returns an
index_const_iteratorto the beginning of the indices in the view.- Returns:
An
index_const_iteratorto the beginning
-
inline index_const_iterator indices_cend() const¶
Returns an
index_const_iteratorto the end of the indices in the view.- Returns:
An
index_const_iteratorto the end
-
inline bool operator[](index_type index) const¶
Returns the value of the element at a specific index.
- Parameters:
index – The index of the element
- Returns:
The value of the element at the given index
-
inline void set(index_type index, bool value)¶
Sets the value of the element at a specific index.
- Parameters:
index – The index of the element
value – The value to be set
-
inline uint32 getNumIndices() const¶
Returns the number of indices in the view.
- Returns:
The number of indices
-
inline void clear()¶
Sets all values stored in the view to zero.
-
inline explicit BinaryDokVector(std::unordered_set<uint32> *indices)¶
-
template<typename Vector>
class BinaryDokVectorAllocator : public Vector<T>¶ - #include <vector_dok_binary.hpp>
Allocates the memory for a view that provides access to binary values stored in a sparse vector in the dictionary of keys (DOK) format.
- Template Parameters:
Vector – The type of the view
Public Functions
-
inline BinaryDokVectorAllocator()¶
-
inline BinaryDokVectorAllocator(const BinaryDokVectorAllocator &other)¶
- Parameters:
other – A reference to an object of type
BinaryDokVectorAllocatorthat should be copied
-
inline BinaryDokVectorAllocator(BinaryDokVectorAllocator &&other)¶
- Parameters:
other – A reference to an object of type
BinaryDokVectorAllocatorthat should be moved
-
inline virtual ~BinaryDokVectorAllocator() override¶