11#ifndef __RD_BITVECT_H__
12#define __RD_BITVECT_H__
28 virtual bool setBit(
const unsigned int which) = 0;
30 virtual bool unsetBit(
const unsigned int which) = 0;
32 virtual bool getBit(
const unsigned int which)
const = 0;
56 bool isBase64 =
false,
bool allowOldFormat =
false);
61 virtual bool operator[](
const unsigned int which)
const = 0;
62 unsigned int size()
const {
return getNumBits(); }
65 virtual void _initForSize(
const unsigned int size) = 0;
DoubleVect::iterator DoubleVectIter
std::vector< int > IntVect
IntVect::iterator IntVectIter
const int ci_BITVECT_VERSION
version number to use in pickles
std::vector< double > DoubleVect
Abstract base class for storing BitVectors.
unsigned int size() const
void initFromText(const char *data, const unsigned int dataLen, bool isBase64=false, bool allowOldFormat=false)
initializes this BitVect from a pickle
virtual bool unsetBit(const unsigned int which)=0
unsets a particular bit and returns its original value
virtual void clearBits()=0
clears (sets to off) all of our bits
virtual std::string toString() const =0
returns a serialized (pickled) version of this BitVect
virtual unsigned int getNumBits() const =0
returns the number of bits (the length of the BitVect)
virtual void getOnBits(IntVect &v) const =0
replaces the contents of v with indices of our on bits
virtual bool operator[](const unsigned int which) const =0
virtual bool getBit(const unsigned int which) const =0
returns the value of a particular bit
virtual unsigned int getNumOffBits() const =0
returns the number of off bits
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
#define RDKIT_DATASTRUCTS_EXPORT