A compact container for storing single bits. More...
#include <BitSet.h>
Classes | |
class | Iterator |
Iterates over all set bits of a BitSet. More... | |
class | Manipulator |
Opaque structure for transparent write access to individual bits. More... | |
Public Types | |
typedef std::size_t | size_t |
Public Member Functions | |
size_t | bits () const |
returns the number of set bits in the container More... | |
BitSet () | |
BitSet (const BitSet &orig) | |
BitSet (size_t bits) | |
construct BitSet with a fixed size of bits bits More... | |
Iterator | iter () const |
create iterator over all set bits More... | |
BitSet & | operator= (const BitSet &orig) |
Manipulator | operator[] (size_t bit) |
provide read/write access to bit with index bit via reference More... | |
const Manipulator | operator[] (size_t bit) const |
provide read access to bit with index bit via reference More... | |
size_t | size () const |
returns the number of all bits in the container More... | |
~BitSet () | |
Protected Types | |
typedef unsigned int | Word_t |
Static Private Member Functions | |
static size_t | bitsToWords (std::size_t bits) |
Private Attributes | |
size_t | bits_ |
Word_t * | store |
Static Private Attributes | |
static const unsigned int | wordSize = sizeof(Word_t) * 8 |
A compact container for storing single bits.
BitSet provides a container of boolean values, similar to a std::vector<bool> which only consumes one actual bit for each value. Also an iterator is provided that can iterate over all set bits.
typedef std::size_t PhysicsTools::BitSet::size_t |
|
protected |
|
inline |
Definition at line 128 of file BitSet.h.
References bits_, bitsToWords(), and store.
|
inline |
construct BitSet with a fixed size of bits bits
Definition at line 139 of file BitSet.h.
References bitsToWords(), and store.
BitSet::size_t PhysicsTools::BitSet::bits | ( | ) | const |
returns the number of set bits in the container
Definition at line 6 of file BitSet.cc.
References begin, bits_, bitsToWords(), constexpr, end, AlCaHLTBitMon_ParallelJobs::p, and store.
Referenced by size().
|
inlinestaticprivate |
Definition at line 183 of file BitSet.h.
References wordSize.
Referenced by bits(), BitSet(), iter(), and operator=().
|
inline |
create iterator over all set bits
Definition at line 179 of file BitSet.h.
References bits_, bitsToWords(), and store.
Referenced by PhysicsTools::VarProcessor::configure(), PhysicsTools::VarProcessor::deriv(), and PhysicsTools::VarProcessor::eval().
Definition at line 151 of file BitSet.h.
References bits_, bitsToWords(), and store.
|
inline |
provide read/write access to bit with index bit via reference
Definition at line 165 of file BitSet.h.
References PhysicsTools::BitSet::Manipulator::Manipulator(), store, and wordSize.
|
inline |
provide read access to bit with index bit via reference
Definition at line 169 of file BitSet.h.
References PhysicsTools::BitSet::Manipulator::Manipulator(), store, and wordSize.
|
inline |
returns the number of all bits in the container
Definition at line 173 of file BitSet.h.
Referenced by ntuple._Collection::__iter__(), ntuple._Collection::__len__(), PhysicsTools::VarProcessor::configure(), and PhysicsTools::Calibration::convert().
|
private |
|
private |
Definition at line 188 of file BitSet.h.
Referenced by bits(), BitSet(), iter(), PhysicsTools::BitSet::Iterator::Iterator(), PhysicsTools::BitSet::Iterator::operator bool(), PhysicsTools::BitSet::Iterator::operator()(), PhysicsTools::BitSet::Iterator::operator++(), operator=(), operator[](), and ~BitSet().
|
staticprivate |
Definition at line 186 of file BitSet.h.
Referenced by bitsToWords(), PhysicsTools::BitSet::Iterator::operator()(), PhysicsTools::BitSet::Iterator::operator++(), and operator[]().