herwig is hosted by Hepforge, IPPP Durham
Herwig  7.2.1
exsample::bit_container< bits > Struct Template Reference

Fixed-size, packed vector of bools. More...

#include <utility.h>

Inheritance diagram for exsample::bit_container< bits >:

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
 

Detailed Description

template<unsigned long bits>
struct exsample::bit_container< bits >

Fixed-size, packed vector of bools.

Definition at line 55 of file utility.h.

Member Enumeration Documentation

◆ anonymous enum

template<unsigned long bits>
anonymous enum
Enumerator
n_bits 

the number of bits contained

uint_bits 

the number of bits fitting in a unsigned long

n_segments 

the number of unsigned long segments needed

Definition at line 57 of file utility.h.


The documentation for this struct was generated from the following file: