![]() |
RDKit
Open-source cheminformatics and machine learning.
|
a class for bit vectors that are densely occupied More...
#include <ExplicitBitVect.h>
Public Member Functions | |
ExplicitBitVect () | |
ExplicitBitVect (unsigned int size) | |
initialize with a particular size; More... | |
ExplicitBitVect (unsigned int size, bool bitsSet) | |
initialize with a particular size and all bits set More... | |
ExplicitBitVect (const ExplicitBitVect &other) | |
ExplicitBitVect (const std::string &) | |
construct from a string pickle More... | |
ExplicitBitVect (const char *, const unsigned int) | |
construct from a text pickle More... | |
~ExplicitBitVect () | |
ExplicitBitVect & | operator= (const ExplicitBitVect &other) |
bool | operator[] (const unsigned int which) const |
bool | setBit (const unsigned int which) |
sets a particular bit and returns its original value More... | |
bool | unsetBit (const unsigned int which) |
unsets a particular bit and returns its original value More... | |
bool | getBit (const unsigned int which) const |
returns the value of a particular bit More... | |
ExplicitBitVect | operator^ (const ExplicitBitVect &other) const |
ExplicitBitVect | operator& (const ExplicitBitVect &other) const |
ExplicitBitVect | operator| (const ExplicitBitVect &other) const |
ExplicitBitVect | operator~ () const |
ExplicitBitVect | operator+ (const ExplicitBitVect &other) const |
ExplicitBitVect & | operator^= (const ExplicitBitVect &other) |
ExplicitBitVect & | operator&= (const ExplicitBitVect &other) |
ExplicitBitVect & | operator|= (const ExplicitBitVect &other) |
ExplicitBitVect & | operator+= (const ExplicitBitVect &other) |
unsigned int | getNumBits () const |
returns the number of bits (the length of the BitVect) More... | |
unsigned int | getNumOnBits () const |
returns the number of on bits More... | |
unsigned int | getNumOffBits () const |
returns the number of off bits More... | |
void | getOnBits (IntVect &v) const |
replaces the contents of v with indices of our on bits More... | |
void | clearBits () |
clears (sets to off) all of our bits More... | |
std::string | toString () const |
returns a serialized (pickled) version of this BitVect More... | |
bool | operator== (const ExplicitBitVect &o) const |
bool | operator!= (const ExplicitBitVect &o) const |
![]() | |
virtual | ~BitVect ()=0 |
void | initFromText (const char *data, const unsigned int dataLen, bool isBase64=false, bool allowOldFormat=false) |
initializes this BitVect from a pickle More... | |
unsigned int | size () const |
Public Attributes | |
boost::dynamic_bitset * | dp_bits |
our raw storage More... | |
a class for bit vectors that are densely occupied
ExplicitBitVect objects store all of their bits using a boost::dynamic_bitset
These are very fast, but can require large amounts of memory for large, sparsely occupied vectors.
Definition at line 26 of file ExplicitBitVect.h.
|
inline |
Definition at line 28 of file ExplicitBitVect.h.
Referenced by ExplicitBitVect().
|
inlineexplicit |
initialize with a particular size;
Definition at line 30 of file ExplicitBitVect.h.
References ExplicitBitVect(), getBit(), getNumBits(), getNumOffBits(), getNumOnBits(), getOnBits(), operator&(), operator&=(), operator+(), operator+=(), operator=(), operator[](), operator^(), operator^=(), operator|(), operator|=(), operator~(), setBit(), BitVect::size(), unsetBit(), and ~ExplicitBitVect().
ExplicitBitVect::ExplicitBitVect | ( | unsigned int | size, |
bool | bitsSet | ||
) |
initialize with a particular size and all bits set
ExplicitBitVect::ExplicitBitVect | ( | const ExplicitBitVect & | other | ) |
ExplicitBitVect::ExplicitBitVect | ( | const std::string & | ) |
construct from a string pickle
ExplicitBitVect::ExplicitBitVect | ( | const char * | , |
const unsigned | int | ||
) |
construct from a text pickle
ExplicitBitVect::~ExplicitBitVect | ( | ) |
Referenced by ExplicitBitVect().
|
inlinevirtual |
clears (sets to off) all of our bits
Implements BitVect.
Definition at line 66 of file ExplicitBitVect.h.
References dp_bits, and toString().
|
virtual |
|
virtual |
returns the number of bits (the length of the BitVect)
Implements BitVect.
Referenced by ExplicitBitVect().
|
virtual |
|
virtual |
|
virtual |
replaces the contents of v
with indices of our on bits
Implements BitVect.
Referenced by ExplicitBitVect().
|
inline |
Definition at line 74 of file ExplicitBitVect.h.
References dp_bits.
ExplicitBitVect ExplicitBitVect::operator& | ( | const ExplicitBitVect & | other | ) | const |
Referenced by ExplicitBitVect().
ExplicitBitVect& ExplicitBitVect::operator&= | ( | const ExplicitBitVect & | other | ) |
Referenced by ExplicitBitVect().
ExplicitBitVect ExplicitBitVect::operator+ | ( | const ExplicitBitVect & | other | ) | const |
Referenced by ExplicitBitVect().
ExplicitBitVect& ExplicitBitVect::operator+= | ( | const ExplicitBitVect & | other | ) |
Referenced by ExplicitBitVect().
ExplicitBitVect& ExplicitBitVect::operator= | ( | const ExplicitBitVect & | other | ) |
Referenced by ExplicitBitVect().
|
inline |
Definition at line 71 of file ExplicitBitVect.h.
References dp_bits.
|
virtual |
Implements BitVect.
Referenced by ExplicitBitVect().
ExplicitBitVect ExplicitBitVect::operator^ | ( | const ExplicitBitVect & | other | ) | const |
Referenced by ExplicitBitVect().
ExplicitBitVect& ExplicitBitVect::operator^= | ( | const ExplicitBitVect & | other | ) |
Referenced by ExplicitBitVect().
ExplicitBitVect ExplicitBitVect::operator| | ( | const ExplicitBitVect & | other | ) | const |
Referenced by ExplicitBitVect().
ExplicitBitVect& ExplicitBitVect::operator|= | ( | const ExplicitBitVect & | other | ) |
Referenced by ExplicitBitVect().
ExplicitBitVect ExplicitBitVect::operator~ | ( | ) | const |
Referenced by ExplicitBitVect().
|
virtual |
sets a particular bit and returns its original value
Implements BitVect.
Referenced by RDInfoTheory::BitCorrMatGenerator::collectVotes(), and ExplicitBitVect().
|
virtual |
returns a serialized (pickled) version of this BitVect
Implements BitVect.
Referenced by clearBits().
|
virtual |
unsets a particular bit and returns its original value
Implements BitVect.
Referenced by ExplicitBitVect().
boost::dynamic_bitset* ExplicitBitVect::dp_bits |
our raw storage
Definition at line 69 of file ExplicitBitVect.h.
Referenced by clearBits(), operator!=(), and operator==().