Herwig 7.3.0
|
Fixed-size, packed vector of bools. More...
#include <utility.h>
Public Types | |
enum | { n_bits = bits , uint_bits = CHAR_BIT * sizeof(unsigned long) , n_segments = bits / uint_bits + static_binary<bits % uint_bits>::value } |
Public Member Functions | |
bit_container () | |
the default constructor | |
void | reset () |
put all values to false | |
bool | operator== (const bit_container &x) const |
compare for equality | |
bool | operator< (const bit_container &x) const |
compare for ordering | |
void | bit (unsigned long k, bool value) |
set the k'th bit | |
bool | bit (unsigned long k) const |
get the k'th bit | |
template<class OStream > | |
void | dump (OStream &os) const |
print to ostream | |
template<class OStream > | |
void | put (OStream &os) const |
put to ostream | |
template<class IStream > | |
void | get (IStream &is) |
get from istream | |
Private Attributes | |
unsigned long | segments [n_segments] |
segments needed to keep the hash value | |
Fixed-size, packed vector of bools.
anonymous enum |
|
inline |
the default constructor
Definition at line 68 of file utility.h.
References exsample::bit_container< bits >::n_segments, and exsample::bit_container< bits >::segments.
|
inline |
get the k'th bit
Definition at line 105 of file utility.h.
References exsample::bit_container< bits >::n_bits, exsample::bit_container< bits >::n_segments, exsample::bit_container< bits >::segments, and exsample::bit_container< bits >::uint_bits.
|
inline |
set the k'th bit
Definition at line 96 of file utility.h.
References exsample::bit_container< bits >::n_bits, exsample::bit_container< bits >::n_segments, exsample::bit_container< bits >::segments, and exsample::bit_container< bits >::uint_bits.
Referenced by exsample::binary_tree< Value >::do_subtree_hash().
|
inline |
print to ostream
Definition at line 112 of file utility.h.
References exsample::bit_container< bits >::n_segments, and exsample::bit_container< bits >::segments.
|
inline |
get from istream
Definition at line 128 of file utility.h.
References exsample::bit_container< bits >::n_segments, and exsample::bit_container< bits >::segments.
|
inline |
compare for ordering
Definition at line 88 of file utility.h.
References exsample::bit_container< bits >::n_segments, and exsample::bit_container< bits >::segments.
|
inline |
compare for equality
Definition at line 80 of file utility.h.
References exsample::bit_container< bits >::n_segments, and exsample::bit_container< bits >::segments.
|
inline |
put to ostream
Definition at line 119 of file utility.h.
References exsample::bit_container< bits >::n_segments, exsample::bit_container< bits >::segments, and exsample::ostream_traits< OStream >::separator().
|
inline |
put all values to false
Definition at line 74 of file utility.h.
References exsample::bit_container< bits >::n_segments, and exsample::bit_container< bits >::segments.
|
private |
segments needed to keep the hash value
Definition at line 137 of file utility.h.
Referenced by exsample::bit_container< bits >::bit(), exsample::bit_container< bits >::bit_container(), exsample::bit_container< bits >::dump(), exsample::bit_container< bits >::get(), exsample::bit_container< bits >::operator<(), exsample::bit_container< bits >::operator==(), exsample::bit_container< bits >::put(), and exsample::bit_container< bits >::reset().