File view_vector_dok_binary.hpp¶
Typedefs
-
typedef BinaryDokVectorAllocator<BinaryDokVector> AllocatedBinaryDokVector¶
Allocates the memory, a
BinaryDokVector
provides access to.
-
class BinaryDokVector¶
- #include <view_vector_dok_binary.hpp>
A view that provides access to binary values stored in a sparse vector in the dictionary of keys (DOK) format.
Public Types
Public Functions
-
inline BinaryDokVector(std::unordered_set<uint32> *indices)¶
- Parameters:
indices – A pointer to an object of type
std::unordered_set
that stores the indices of all non-zero elements in the view
-
inline BinaryDokVector(const BinaryDokVector &other)¶
- Parameters:
other – A reference to an object of type
BinaryDokVector
that should be copied
-
inline BinaryDokVector(BinaryDokVector &&other)¶
- Parameters:
other – A reference to an object of type
BinaryDokVector
that should be moved
-
inline virtual ~BinaryDokVector()¶
-
inline index_const_iterator indices_cbegin() const¶
Returns an
index_const_iterator
to the beginning of the indices in the view.- Returns:
An
index_const_iterator
to the beginning
-
inline index_const_iterator indices_cend() const¶
Returns an
index_const_iterator
to the end of the indices in the view.- Returns:
An
index_const_iterator
to 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 void clear()¶
Sets all values stored in the view to zero.
-
inline BinaryDokVector(std::unordered_set<uint32> *indices)¶
-
template<typename Vector>
class BinaryDokVectorAllocator : public Vector<T>¶ - #include <view_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
BinaryDokVectorAllocator
that should be copied
-
inline BinaryDokVectorAllocator(BinaryDokVectorAllocator &&other)¶
- Parameters:
other – A reference to an object of type
BinaryDokVectorAllocator
that should be moved
-
inline virtual ~BinaryDokVectorAllocator() override¶