|
spot
2.16
|
A fixed-size bitset backed by N unsigned words. More...
#include <spot/misc/bitset.hh>
Public Member Functions | |
| operator bool () const | |
| Return true if any bit is set. More... | |
| size_t | hash () const |
| Return a hash of the bitset. More... | |
| bool | operator== (const bitset &other) const |
| Equality comparison. More... | |
| bool | operator!= (const bitset &other) const |
| Inequality comparison. More... | |
| bool | operator< (const bitset &other) const |
| Lexicographic less-than comparison. More... | |
| bool | operator<= (const bitset &other) const |
| Lexicographic less-than-or-equal comparison. More... | |
| bool | operator> (const bitset &other) const |
| Lexicographic greater-than comparison. More... | |
| bool | operator>= (const bitset &other) const |
| Lexicographic greater-than-or-equal comparison. More... | |
| void | set (unsigned s) |
| Set bit s to one. More... | |
| void | clear (unsigned s) |
| Clear bit s (set it to zero). More... | |
| bitset | operator<< (unsigned s) const |
| Return the bitset shifted left by s positions. More... | |
| bitset | operator>> (unsigned s) const |
| Return the bitset shifted right by s positions. More... | |
| bitset & | operator<<= (unsigned s) |
| Shift left in place by s positions. More... | |
| bitset & | operator>>= (unsigned s) |
| Shift right in place by s positions. More... | |
| bitset | operator~ () const |
| Return the bitwise complement. More... | |
| bitset | operator& (const bitset &other) const |
| Return the bitwise AND of *this and other. More... | |
| bitset | operator| (const bitset &other) const |
| Return the bitwise OR of *this and other. More... | |
| bitset | operator^ (const bitset &other) const |
| Return the bitwise XOR of *this and other. More... | |
| bitset & | operator&= (const bitset &other) |
| In-place bitwise AND with other. More... | |
| bitset & | operator|= (const bitset &other) |
| In-place bitwise OR with other. More... | |
| bitset & | operator^= (const bitset &other) |
| In-place bitwise XOR with other. More... | |
| bitset | operator- (word_t s) const |
| Return the result of subtracting s from the bitset. More... | |
| bitset & | operator-= (word_t s) |
| Subtract s from the bitset in place. More... | |
| bitset | operator- () const |
| Return the arithmetic negation (two's complement). More... | |
| unsigned | count () const |
| Return the number of set bits (popcount). More... | |
| unsigned | highest () const |
| Return the position of the highest set bit. More... | |
| unsigned | lowest () const |
| Return the position of the lowest set bit. More... | |
Static Public Member Functions | |
| static constexpr bitset | zero () |
| the 0 More... | |
| static constexpr bitset | one () |
| the 1 More... | |
| static bitset | mone () |
| the -1 (all bits are set to 1) More... | |
A fixed-size bitset backed by N unsigned words.
|
inline |
Clear bit s (set it to zero).
|
inline |
Return the number of set bits (popcount).
References spot::U.
|
inline |
Return a hash of the bitset.
References spot::fnv_hash().
Referenced by std::hash< spot::bitset< N > >::operator()().
|
inline |
Return the position of the highest set bit.
References spot::clz().
|
inline |
Return the position of the lowest set bit.
References spot::U.
|
inlinestatic |
the -1 (all bits are set to 1)
|
inlinestaticconstexpr |
the 1
|
inlineexplicit |
Return true if any bit is set.
|
inline |
Inequality comparison.
References spot::operator==().
|
inline |
Return the bitwise AND of *this and other.
|
inline |
In-place bitwise AND with other.
|
inline |
Return the arithmetic negation (two's complement).
|
inline |
Return the result of subtracting s from the bitset.
|
inline |
Subtract s from the bitset in place.
|
inline |
Lexicographic less-than comparison.
|
inline |
Return the bitset shifted left by s positions.
|
inline |
Shift left in place by s positions.
|
inline |
Lexicographic less-than-or-equal comparison.
|
inline |
Equality comparison.
|
inline |
Lexicographic greater-than comparison.
|
inline |
Lexicographic greater-than-or-equal comparison.
|
inline |
Return the bitset shifted right by s positions.
|
inline |
Shift right in place by s positions.
|
inline |
Return the bitwise XOR of *this and other.
|
inline |
In-place bitwise XOR with other.
|
inline |
Return the bitwise OR of *this and other.
|
inline |
In-place bitwise OR with other.
|
inline |
Return the bitwise complement.
|
inline |
Set bit s to one.
|
inlinestaticconstexpr |
the 0
References spot::U.
1.9.1