![]() |
RDKit
Open-source cheminformatics and machine learning.
|
Abstract base class for storing BitVectors. More...
#include <BitVect.h>
Public Member Functions | |
virtual | ~BitVect ()=0 |
virtual bool | setBit (const unsigned int which)=0 |
sets a particular bit and returns its original value More... | |
virtual bool | unsetBit (const unsigned int which)=0 |
unsets a particular bit and returns its original value More... | |
virtual bool | getBit (const unsigned int which) const =0 |
returns the value of a particular bit More... | |
virtual unsigned int | getNumBits () const =0 |
returns the number of bits (the length of the BitVect) More... | |
virtual unsigned int | getNumOnBits () const =0 |
returns the number of on bits More... | |
virtual unsigned int | getNumOffBits () const =0 |
returns the number of off bits More... | |
virtual void | getOnBits (IntVect &v) const =0 |
replaces the contents of v with indices of our on bits More... | |
virtual void | clearBits ()=0 |
clears (sets to off) all of our bits More... | |
void | initFromText (const char *data, const unsigned int dataLen, bool isBase64=false, bool allowOldFormat=false) |
initializes this BitVect from a pickle More... | |
virtual std::string | toString () const =0 |
returns a serialized (pickled) version of this BitVect More... | |
virtual bool | operator[] (const unsigned int which) const =0 |
unsigned int | size () const |
|
pure virtual |
|
pure virtual |
clears (sets to off) all of our bits
Implemented in SparseBitVect, and ExplicitBitVect.
|
pure virtual |
returns the value of a particular bit
Implemented in SparseBitVect, and ExplicitBitVect.
|
pure virtual |
returns the number of bits (the length of the BitVect)
Implemented in SparseBitVect, and ExplicitBitVect.
Referenced by size().
|
pure virtual |
returns the number of off bits
Implemented in SparseBitVect, and ExplicitBitVect.
|
pure virtual |
returns the number of on bits
Implemented in SparseBitVect, and ExplicitBitVect.
|
pure virtual |
replaces the contents of v
with indices of our on bits
Implemented in SparseBitVect, and ExplicitBitVect.
void BitVect::initFromText | ( | const char * | data, |
const unsigned int | dataLen, | ||
bool | isBase64 = false , |
||
bool | allowOldFormat = false |
||
) |
initializes this BitVect from a pickle
data | the raw pickle data |
dataLen | the length of data |
isBase64 | (optional) if this is set, data is assumed to be base64 encoded. |
allowOldFormat | (optional) allows a very old form of the BitVect representation to be recognized. This argument disables a large amount of error checking and it is strongly suggested that it not be used in client code. |
|
pure virtual |
Implemented in SparseBitVect, and ExplicitBitVect.
|
pure virtual |
sets a particular bit and returns its original value
Implemented in SparseBitVect, and ExplicitBitVect.
|
inline |
Definition at line 61 of file BitVect.h.
References getNumBits().
Referenced by ExplicitBitVect::ExplicitBitVect(), and SparseBitVect::operator!=().
|
pure virtual |
returns a serialized (pickled) version of this BitVect
Implemented in SparseBitVect, and ExplicitBitVect.
|
pure virtual |
unsets a particular bit and returns its original value
Implemented in SparseBitVect, and ExplicitBitVect.