 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
11 #ifndef __RD_SPARSEBITVECTS_H__
12 #define __RD_SPARSEBITVECTS_H__
48 std::copy(bv->begin(), bv->end(), std::inserter(*dp_bits, dp_bits->end()));
68 bool setBit(
const unsigned int which);
71 bool getBit(
const unsigned int which)
const;
76 return static_cast<unsigned int>(dp_bits->size());
79 return d_size -
static_cast<unsigned int>(dp_bits->size());
97 void _initForSize(
const unsigned int size);
SparseBitVect & operator=(const SparseBitVect &)
SparseBitVect operator|(const SparseBitVect &) const
IntVect::iterator IntVectIter
void getOnBits(IntVect &v) const
replaces the contents of v with indices of our on bits
unsigned int getNumOffBits() const
returns the number of off bits
SparseBitVect operator~() const
unsigned int getNumBits() const
returns the number of bits (the length of the BitVect)
SparseBitVect(unsigned int size)
initialize with a particular size;
unsigned int getNumOnBits() const
returns the number of on bits
SparseBitVect operator^(const SparseBitVect &) const
IntSet::iterator IntSetIter
bool operator!=(const SparseBitVect &o) const
SparseBitVect(const std::string &)
construct from a string pickle
#define RDKIT_DATASTRUCTS_EXPORT
IntSet::const_iterator IntSetConstIter
Abstract base class for storing BitVectors.
bool getBit(const unsigned int which) const
returns the value of a particular bit
bool getBit(const IntSetIter which) const
SparseBitVect(const char *data, const unsigned int dataLen)
construct from a text pickle
const IntSet * getBitSet() const
returns a (const) pointer to our raw storage
SparseBitVect operator&(const SparseBitVect &) const
void clearBits()
clears (sets to off) all of our bits
bool operator[](const unsigned int which) const
a class for bit vectors that are sparsely occupied.
std::vector< int > IntVect
std::string toString() const
returns a serialized (pickled) version of this BitVect
IntSet * dp_bits
our raw data, exposed for the sake of efficiency
bool setBit(const unsigned int which)
sets a particular bit and returns its original value
bool unsetBit(const unsigned int which)
unsets a particular bit and returns its original value
SparseBitVect(const SparseBitVect &other)
copy constructor
bool getBit(const IntVectIter which) const
bool setBit(const IntSetIter which)
bool operator==(const SparseBitVect &o) const