Sux
Public Member Functions | List of all members
sux::bits::DynamicBitVector Class Referenceabstract

#include <DynamicBitVector.hpp>

Inheritance diagram for sux::bits::DynamicBitVector:
sux::bits::StrideDynRankSel< SPS, WORDS, AT > sux::bits::WordDynRankSel< SPS, AT >

Public Member Functions

virtual ~DynamicBitVector ()=default
 
virtual uint64_t update (size_t index, uint64_t word)=0
 
virtual bool set (size_t index)=0
 
virtual bool clear (size_t index)=0
 
virtual bool toggle (size_t index)=0
 
virtual size_t bitCount () const =0
 

Detailed Description

An interface for all classes implementating dynamic bit vectors.

We suggest to make every implementation of this interface serializable and deserializable by overriding the standard overloaded operators:

Constructor & Destructor Documentation

◆ ~DynamicBitVector()

virtual sux::bits::DynamicBitVector::~DynamicBitVector ( )
virtualdefault

Member Function Documentation

◆ bitCount()

virtual size_t sux::bits::DynamicBitVector::bitCount ( ) const
pure virtual

Returns an estimate of the size (in bits) of this structure.

Implemented in sux::bits::StrideDynRankSel< SPS, WORDS, AT >, and sux::bits::WordDynRankSel< SPS, AT >.

◆ clear()

virtual bool sux::bits::DynamicBitVector::clear ( size_t  index)
pure virtual

Clear (set to 0) a given bit in the bitvector.

Parameters
indexindex (in bits) in the bitvector.
Returns
: the previous value of such a bit.

Implemented in sux::bits::StrideDynRankSel< SPS, WORDS, AT >, and sux::bits::WordDynRankSel< SPS, AT >.

◆ set()

virtual bool sux::bits::DynamicBitVector::set ( size_t  index)
pure virtual

Set (set to 1) a given bit in the bitvector.

Parameters
indexindex (in bits) in the bitvector.
Returns
the previous value of such a bit.

Implemented in sux::bits::StrideDynRankSel< SPS, WORDS, AT >, and sux::bits::WordDynRankSel< SPS, AT >.

◆ toggle()

virtual bool sux::bits::DynamicBitVector::toggle ( size_t  index)
pure virtual

Change the value of a given bit in the bitvector.

Parameters
indexindex (in bits) in the bitvector.
Returns
: the previous value of such a bit.

Implemented in sux::bits::StrideDynRankSel< SPS, WORDS, AT >, and sux::bits::WordDynRankSel< SPS, AT >.

◆ update()

virtual uint64_t sux::bits::DynamicBitVector::update ( size_t  index,
uint64_t  word 
)
pure virtual

Replace a given word in the bitvector.

Parameters
indexindex (in words) in the bitvector.
wordnew value for bitvector[index].
Returns
the replaced word.

Implemented in sux::bits::StrideDynRankSel< SPS, WORDS, AT >, and sux::bits::WordDynRankSel< SPS, AT >.


The documentation for this class was generated from the following file: