11 #ifndef __RD_EXPLICITBITVECTS_H__ 12 #define __RD_EXPLICITBITVECTS_H__ 14 #include <boost/dynamic_bitset.hpp> 42 bool operator[] (
const unsigned int which)
const;
43 bool setBit(
const unsigned int which);
44 bool unsetBit(
const unsigned int which);
45 bool getBit(
const unsigned int which)
const;
80 unsigned int d_numOnBits;
81 void _initForSize(
const unsigned int size);
ExplicitBitVect operator|(const ExplicitBitVect &other) const
bool operator!=(const ExplicitBitVect &o) const
ExplicitBitVect operator^(const ExplicitBitVect &other) const
bool unsetBit(const unsigned int which)
unsets a particular bit and returns its original value
ExplicitBitVect operator~() const
ExplicitBitVect operator+(const ExplicitBitVect &other) const
ExplicitBitVect & operator^=(const ExplicitBitVect &other)
bool operator[](const unsigned int which) const
boost::dynamic_bitset * dp_bits
our raw storage
void clearBits()
clears (sets to off) all of our bits
ExplicitBitVect & operator=(const ExplicitBitVect &other)
ExplicitBitVect & operator+=(const ExplicitBitVect &other)
unsigned int getNumOnBits() const
returns the number of on bits
std::string toString() const
returns a serialized (pickled) version of this BitVect
ExplicitBitVect(unsigned int size)
initialize with a particular size;
unsigned int getNumBits() const
returns the number of bits (the length of the BitVect)
void getOnBits(IntVect &v) const
replaces the contents of v with indices of our on bits
bool operator==(const ExplicitBitVect &o) const
unsigned int getNumOffBits() const
returns the number of off bits
unsigned int size() const
bool setBit(const unsigned int which)
sets a particular bit and returns its original value
ExplicitBitVect & operator|=(const ExplicitBitVect &other)
ExplicitBitVect operator&(const ExplicitBitVect &other) const
std::vector< int > IntVect
a class for bit vectors that are densely occupied
bool getBit(const unsigned int which) const
returns the value of a particular bit
Abstract base class for storing BitVectors.
ExplicitBitVect & operator&=(const ExplicitBitVect &other)