Simple bitsets for recording violations. More...
#include <violations.hpp>
Public Member Functions | |
Violations (void) | |
Default constructor. More... | |
void | init (Space &home, unsigned int n) |
Initialize violation set for n violations. More... | |
void | update (Space &home, bool shared, Violations &v) |
Update violation set during cloning. More... | |
bool | empty (void) const |
Return whether set is empty. More... | |
void | add (unsigned int i) |
Add i to violation set. More... | |
unsigned int | get (void) |
Get first element from violation set and remove it. More... | |
![]() | |
BitSetBase (void) | |
Default constructor (yields empty set) More... | |
template<class A > | |
BitSetBase (A &a, unsigned int s, bool setbits=false) | |
Initialize for s bits and allocator a. More... | |
template<class A > | |
BitSetBase (A &a, const BitSetBase &bs) | |
Copy from bitset bs with allocator a. More... | |
template<class A > | |
void | init (A &a, unsigned int s, bool setbits=false) |
Initialize for s bits and allocator a (only after default constructor) More... | |
void | clearall (bool setbits=false) |
Clear sz bits. More... | |
void | copy (const BitSetBase &bs) |
Copy sz bits from bs. More... | |
unsigned int | size (void) const |
Return size of bitset (number of bits) More... | |
bool | get (unsigned int i) const |
Access value at bit i. More... | |
void | set (unsigned int i) |
Set bit i. More... | |
void | clear (unsigned int i) |
Clear bit i. More... | |
unsigned int | next (unsigned int i) const |
Return position greater or equal i of next set bit (i is allowed to be equal to size) More... | |
BitSetStatus | status (void) const |
Return status of bitset. More... | |
bool | all (void) const |
Test whether all bits are set. More... | |
bool | none (void) const |
Test whether no bits are set. More... | |
template<class A > | |
void | resize (A &a, unsigned int n, bool setbits=false) |
Resize bitset to n elememts. More... | |
template<class A > | |
void | dispose (A &a) |
Dispose memory for bit set. More... | |
![]() | |
RawBitSetBase (void) | |
Default constructor (yields empty set) More... | |
template<class A > | |
RawBitSetBase (A &a, unsigned int sz, bool setbits=false) | |
Initialize for sz bits and allocator a. More... | |
template<class A > | |
RawBitSetBase (A &a, unsigned int sz, const RawBitSetBase &bs) | |
Copy from bitset bs with allocator a. More... | |
template<class A > | |
void | allocate (A &a, unsigned int sz) |
Allocate for sz bits and allocator a (only after default constructor) More... | |
template<class A > | |
void | init (A &a, unsigned int sz, bool setbits=false) |
Initialize for sz bits and allocator a (only after default constructor) More... | |
void | clearall (unsigned int sz, bool setbits=false) |
Clear sz bits. More... | |
void | copy (unsigned int sz, const RawBitSetBase &bs) |
Copy sz bits from bs. More... | |
bool | get (unsigned int i) const |
Access value at bit i. More... | |
void | set (unsigned int i) |
Set bit i. More... | |
void | clear (unsigned int i) |
Clear bit i. More... | |
unsigned int | next (unsigned int i) const |
Return position greater or equal i of next set bit (i is allowed to be equal to size) More... | |
BitSetStatus | status (unsigned int sz) const |
Return status of bitset. More... | |
bool | all (unsigned int sz) const |
Test whether all bits are set. More... | |
bool | none (unsigned int sz) const |
Test whether no bits are set. More... | |
template<class A > | |
void | resize (A &a, unsigned int sz, unsigned int n, bool setbits=false) |
Resize bitset from sz to n elememts. More... | |
template<class A > | |
void | dispose (A &a, unsigned int sz) |
Dispose memory for bit set. More... | |
Protected Attributes | |
unsigned int | fst |
The (possibly) first set bit (set is empty if fst == sz) More... | |
![]() | |
unsigned int | sz |
Size of bitset (number of bits) More... | |
![]() | |
BitSetData * | data |
Stored bits. More... | |
Additional Inherited Members | |
![]() | |
static const unsigned int | bpb = BitSetData::bpb |
Bits per base. More... | |
Simple bitsets for recording violations.
Definition at line 44 of file violations.hpp.
|
inline |
Default constructor.
Definition at line 65 of file violations.hpp.
|
inline |
Initialize violation set for n violations.
Definition at line 68 of file violations.hpp.
|
inline |
Update violation set during cloning.
Definition at line 80 of file violations.hpp.
|
inline |
Return whether set is empty.
Definition at line 74 of file violations.hpp.
|
inline |
Add i to violation set.
Definition at line 86 of file violations.hpp.
|
inline |
Get first element from violation set and remove it.
Definition at line 91 of file violations.hpp.
|
mutableprotected |
The (possibly) first set bit (set is empty if fst == sz)
Definition at line 47 of file violations.hpp.