![]() |
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; | |
| ExplicitBitVect (unsigned int size, bool bitsSet) | |
| initialize with a particular size and all bits set | |
| ExplicitBitVect (const ExplicitBitVect &other) | |
| ExplicitBitVect (ExplicitBitVect &&other) noexcept | |
| ExplicitBitVect (const std::string &pkl) | |
| construct from a string pickle | |
| ExplicitBitVect (const char *, const unsigned int) | |
| construct from a text pickle | |
| ExplicitBitVect (boost::dynamic_bitset<> *bits) | |
| ~ExplicitBitVect () override | |
| ExplicitBitVect & | operator= (const ExplicitBitVect &other) |
| ExplicitBitVect & | operator= (ExplicitBitVect &&other) noexcept |
| bool | operator[] (const unsigned int which) const override |
| bool | setBit (const unsigned int which) override |
| sets a particular bit and returns its original value | |
| bool | unsetBit (const unsigned int which) override |
| unsets a particular bit and returns its original value | |
| bool | getBit (const unsigned int which) const override |
| returns the value of a particular bit | |
| 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 override |
| returns the number of bits (the length of the BitVect) | |
| unsigned int | getNumOnBits () const override |
| returns the number of on bits | |
| unsigned int | getNumOffBits () const override |
| returns the number of off bits | |
| void | getOnBits (IntVect &v) const override |
replaces the contents of v with indices of our on bits | |
| void | clearBits () override |
| clears (sets to off) all of our bits | |
| std::string | toString () const override |
| returns a serialized (pickled) version of this BitVect | |
| bool | operator== (const ExplicitBitVect &o) const |
| bool | operator!= (const ExplicitBitVect &o) const |
Public Member Functions inherited from BitVect | |
| virtual | ~BitVect ()=0 |
| void | initFromText (const char *data, const unsigned int dataLen, bool isBase64=false, bool allowOldFormat=false) |
| initializes this BitVect from a pickle | |
| unsigned int | size () const |
Public Attributes | |
| std::unique_ptr< boost::dynamic_bitset<> > | dp_bits |
| our raw storage | |
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 29 of file ExplicitBitVect.h.
|
inline |
Definition at line 31 of file ExplicitBitVect.h.
Referenced by ExplicitBitVect(), ExplicitBitVect(), operator!=(), operator&(), operator&=(), operator+(), operator+=(), operator=(), operator=(), operator==(), operator^(), operator^=(), operator|(), operator|=(), and operator~().
|
inlineexplicit |
initialize with a particular size;
Definition at line 33 of file ExplicitBitVect.h.
References dp_bits, and BitVect::size().
| ExplicitBitVect::ExplicitBitVect | ( | unsigned int | size, |
| bool | bitsSet ) |
initialize with a particular size and all bits set
References BitVect::size().
| ExplicitBitVect::ExplicitBitVect | ( | const ExplicitBitVect & | other | ) |
References ExplicitBitVect().
|
noexcept |
References ExplicitBitVect().
| ExplicitBitVect::ExplicitBitVect | ( | const std::string & | pkl | ) |
construct from a string pickle
| ExplicitBitVect::ExplicitBitVect | ( | const char * | , |
| const unsigned int | ) |
construct from a text pickle
|
inline |
construct directly from a dynamic_bitset pointer takes ownership of the pointer
Definition at line 47 of file ExplicitBitVect.h.
References dp_bits, and BitVect::size().
|
override |
|
inlineoverridevirtual |
clears (sets to off) all of our bits
Implements BitVect.
Definition at line 80 of file ExplicitBitVect.h.
References dp_bits.
|
overridevirtual |
returns the value of a particular bit
Implements BitVect.
|
overridevirtual |
|
overridevirtual |
returns the number of off bits
Implements BitVect.
|
overridevirtual |
returns the number of on bits
Implements BitVect.
|
overridevirtual |
replaces the contents of v with indices of our on bits
Implements BitVect.
|
inline |
Definition at line 89 of file ExplicitBitVect.h.
References dp_bits, and ExplicitBitVect().
| ExplicitBitVect ExplicitBitVect::operator& | ( | const ExplicitBitVect & | other | ) | const |
References ExplicitBitVect().
| ExplicitBitVect & ExplicitBitVect::operator&= | ( | const ExplicitBitVect & | other | ) |
References ExplicitBitVect().
| ExplicitBitVect ExplicitBitVect::operator+ | ( | const ExplicitBitVect & | other | ) | const |
References ExplicitBitVect().
| ExplicitBitVect & ExplicitBitVect::operator+= | ( | const ExplicitBitVect & | other | ) |
References ExplicitBitVect().
| ExplicitBitVect & ExplicitBitVect::operator= | ( | const ExplicitBitVect & | other | ) |
References ExplicitBitVect().
|
noexcept |
References ExplicitBitVect().
|
inline |
Definition at line 86 of file ExplicitBitVect.h.
References dp_bits, and ExplicitBitVect().
|
overridevirtual |
Implements BitVect.
| ExplicitBitVect ExplicitBitVect::operator^ | ( | const ExplicitBitVect & | other | ) | const |
References ExplicitBitVect().
| ExplicitBitVect & ExplicitBitVect::operator^= | ( | const ExplicitBitVect & | other | ) |
References ExplicitBitVect().
| ExplicitBitVect ExplicitBitVect::operator| | ( | const ExplicitBitVect & | other | ) | const |
References ExplicitBitVect().
| ExplicitBitVect & ExplicitBitVect::operator|= | ( | const ExplicitBitVect & | other | ) |
References ExplicitBitVect().
| ExplicitBitVect ExplicitBitVect::operator~ | ( | ) | const |
References ExplicitBitVect().
|
overridevirtual |
sets a particular bit and returns its original value
Implements BitVect.
Referenced by RDInfoTheory::BitCorrMatGenerator::collectVotes().
|
overridevirtual |
|
overridevirtual |
unsets a particular bit and returns its original value
Implements BitVect.
| std::unique_ptr<boost::dynamic_bitset<> > ExplicitBitVect::dp_bits |
our raw storage
Definition at line 83 of file ExplicitBitVect.h.
Referenced by clearBits(), ExplicitBitVect(), ExplicitBitVect(), operator!=(), and operator==().