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 129 of file BitSet.h.
References bits_, bitsToWords(), and store.
|
inline |
construct BitSet with a fixed size of bits bits
Definition at line 140 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(), end, L1TEmulatorMonitor_cff::p, and store.
|
inlinestaticprivate |
Definition at line 184 of file BitSet.h.
References wordSize.
Referenced by bits(), BitSet(), iter(), and operator=().
|
inline |
create iterator over all set bits
Definition at line 180 of file BitSet.h.
References bits_, bitsToWords(), and store.
Referenced by PhysicsTools::VarProcessor::configure(), PhysicsTools::VarProcessor::deriv(), and PhysicsTools::VarProcessor::eval().
Definition at line 152 of file BitSet.h.
References bits_, bitsToWords(), and store.
|
inline |
|
inline |
|
inline |
returns the number of all bits in the container
Definition at line 174 of file BitSet.h.
References bits_.
Referenced by PhysicsTools::VarProcessor::configure(), and PhysicsTools::Calibration::convert().
|
private |
|
private |
Definition at line 189 of file BitSet.h.
Referenced by bits(), BitSet(), iter(), operator=(), operator[](), and ~BitSet().
|
staticprivate |
Definition at line 187 of file BitSet.h.
Referenced by bitsToWords(), PhysicsTools::BitSet::Iterator::operator()(), PhysicsTools::BitSet::Iterator::operator++(), and operator[]().