 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
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;
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
IntVect::iterator IntVectIter
virtual bool setBit(const unsigned int which)=0
sets a particular bit and returns its original value
virtual bool operator[](const unsigned int which) const =0
virtual void getOnBits(IntVect &v) const =0
replaces the contents of v with indices of our on bits
const int ci_BITVECT_VERSION
version number to use in pickles
virtual void clearBits()=0
clears (sets to off) all of our bits
virtual unsigned int getNumOnBits() const =0
returns the number of on bits
#define RDKIT_DATASTRUCTS_EXPORT
virtual std::string toString() const =0
returns a serialized (pickled) version of this BitVect
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
std::vector< double > DoubleVect
virtual bool unsetBit(const unsigned int which)=0
unsets a particular bit and returns its original value
std::vector< int > IntVect
virtual unsigned int getNumBits() const =0
returns the number of bits (the length of the BitVect)
DoubleVect::iterator DoubleVectIter