10 #ifndef __RD_BITVECT_H__ 11 #define __RD_BITVECT_H__ 27 virtual bool setBit(
const unsigned int which) = 0;
29 virtual bool unsetBit(
const unsigned int which) = 0;
31 virtual bool getBit(
const unsigned int which)
const = 0;
54 void initFromText(
const char *data,
const unsigned int dataLen,
55 bool isBase64=
false,
bool allowOldFormat=
false);
58 virtual std::string
toString()
const = 0;
60 virtual bool operator[] (
const unsigned int which)
const = 0;
64 virtual void _initForSize(
const unsigned int size) = 0;
DoubleVect::iterator DoubleVectIter
IntVect::iterator IntVectIter
virtual void clearBits()=0
clears (sets to off) all of our bits
virtual unsigned int getNumBits() const =0
returns the number of bits (the length of the BitVect)
const int ci_BITVECT_VERSION
version number to use in pickles
virtual bool unsetBit(const unsigned int which)=0
unsets a particular bit and returns its original value
virtual bool operator[](const unsigned int which) const =0
void initFromText(const char *data, const unsigned int dataLen, bool isBase64=false, bool allowOldFormat=false)
initializes this BitVect from a pickle
virtual unsigned int getNumOffBits() const =0
returns the number of off bits
virtual bool getBit(const unsigned int which) const =0
returns the value of a particular bit
std::vector< double > DoubleVect
unsigned int size() const
virtual void getOnBits(IntVect &v) const =0
replaces the contents of v with indices of our on bits
std::vector< int > IntVect
virtual std::string toString() const =0
returns a serialized (pickled) version of this BitVect
Abstract base class for storing BitVectors.
virtual unsigned int getNumOnBits() const =0
returns the number of on bits
virtual bool setBit(const unsigned int which)=0
sets a particular bit and returns its original value