#include <ExplicitBitVect.h>

Public Member Functions | |
| ExplicitBitVect () | |
| ExplicitBitVect (unsigned int size) | |
| initialize with a particular size; | |
| ExplicitBitVect (const ExplicitBitVect &other) | |
| ExplicitBitVect (const std::string &) | |
| construct from a string pickle | |
| ExplicitBitVect (const char *, const unsigned int) | |
| construct from a text pickle | |
| ~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 | |
| bool | UnSetBit (const unsigned int which) |
| unsets a particular bit and returns its original value | |
| bool | GetBit (const unsigned int which) const |
| 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 |
| const unsigned int | GetNumBits () const |
| returns the number of bits (the length of the BitVect) | |
| const unsigned int | GetNumOnBits () const |
| returns the number of on bits | |
| const unsigned int | GetNumOffBits () const |
| returns the number of off bits | |
| void | GetOnBits (IntVect &v) const |
replaces the contents of v with indices of our on bits | |
| void | ClearBits () |
| clears (sets to off) all of our bits | |
| std::string | ToString () const |
| returns a serialized (pickled) version of this BitVect | |
| bool | operator== (const ExplicitBitVect &o) const |
| bool | operator!= (const ExplicitBitVect &o) const |
Public Attributes | |
| boost::dynamic_bitset * | dp_bits |
| our raw storage | |
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 21 of file ExplicitBitVect.h.
| ExplicitBitVect::ExplicitBitVect | ( | ) | [inline] |
Definition at line 23 of file ExplicitBitVect.h.
| ExplicitBitVect::ExplicitBitVect | ( | unsigned int | size | ) | [inline, explicit] |
| 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 | ( | ) |
| ExplicitBitVect& ExplicitBitVect::operator= | ( | const ExplicitBitVect & | other | ) |
| bool ExplicitBitVect::operator[] | ( | const unsigned int | which | ) | const [virtual] |
Implements BitVect.
| bool ExplicitBitVect::SetBit | ( | const unsigned int | which | ) | [virtual] |
sets a particular bit and returns its original value
Implements BitVect.
Referenced by RDInfoTheory::BitCorrMatGenerator::collectVotes().
| bool ExplicitBitVect::UnSetBit | ( | const unsigned int | which | ) | [virtual] |
| bool ExplicitBitVect::GetBit | ( | const unsigned int | which | ) | const [virtual] |
| ExplicitBitVect ExplicitBitVect::operator^ | ( | const ExplicitBitVect & | other | ) | const |
| ExplicitBitVect ExplicitBitVect::operator & | ( | const ExplicitBitVect & | other | ) | const |
| ExplicitBitVect ExplicitBitVect::operator| | ( | const ExplicitBitVect & | other | ) | const |
| ExplicitBitVect ExplicitBitVect::operator~ | ( | ) | const |
| const unsigned int ExplicitBitVect::GetNumBits | ( | ) | const [virtual] |
| const unsigned int ExplicitBitVect::GetNumOnBits | ( | ) | const [virtual] |
| const unsigned int ExplicitBitVect::GetNumOffBits | ( | ) | const [virtual] |
| void ExplicitBitVect::GetOnBits | ( | IntVect & | v | ) | const [virtual] |
| void ExplicitBitVect::ClearBits | ( | ) | [inline, virtual] |
clears (sets to off) all of our bits
Implements BitVect.
Definition at line 51 of file ExplicitBitVect.h.
References dp_bits.
| std::string ExplicitBitVect::ToString | ( | ) | const [virtual] |
| bool ExplicitBitVect::operator== | ( | const ExplicitBitVect & | o | ) | const [inline] |
| bool ExplicitBitVect::operator!= | ( | const ExplicitBitVect & | o | ) | const [inline] |
| boost::dynamic_bitset* ExplicitBitVect::dp_bits |
our raw storage
Definition at line 54 of file ExplicitBitVect.h.
Referenced by ClearBits(), operator!=(), and operator==().
1.5.6