|
Zero
0.1.0
|
Templated bitmap for arbitrary size in bits. More...
#include <w_bitvector.h>
Public Types | |
| enum | { BITS = BIT_COUNT } |
| typedef uint64_t | Word |
Public Member Functions | |
| w_bitvector_t () | |
| int | num_bits () const |
| return size in bits More... | |
| int | num_words () const |
| return size in words (unsigned long) More... | |
| bool | overlap (w_bitvector_t &merged, const w_bitvector_t &other) const |
| OR-together and return merged vector. More... | |
| int | words_overlap (w_bitvector_t &merged, const w_bitvector_t &other) const |
| OR-together and return merged vector. More... | |
| bool | contains (const w_bitvector_t &subset) const |
| void | merge (const w_bitvector_t &added) |
| ostream & | print (ostream &o) const |
| void | clear () |
| clear all bits More... | |
| bool | is_empty () const |
| true if all bits are clear More... | |
| int | num_bits_set () const |
| bool | is_full () const |
| true if all bits are set More... | |
| void | copy (const w_bitvector_t &other) |
| copy operator More... | |
| Word | get_bit (Word idx) const |
| Should use is_set() More... | |
| bool | is_set (Word idx) const |
| true if bit at index idx is set More... | |
| void | set_bit (Word idx) |
| set bit at index idx More... | |
| void | clear_bit (Word idx) |
| clear bit at index idx More... | |
Private Types | |
| enum | { BITS_PER_WORD = 8 * sizeof(Word) } |
| enum | { WORDS = (BITS + BITS_PER_WORD - 1) / BITS_PER_WORD } |
Private Attributes | |
| uint64_t | data [WORDS] |
Templated bitmap for arbitrary size in bits.
| typedef uint64_t w_bitvector_t< BIT_COUNT >::Word |
|
inline |
|
inline |
clear all bits
|
inline |
clear bit at index idx
|
inline |
Returns if all ON-bits in subset are also ON in this bitmap.
|
inline |
copy operator
|
inline |
Should use is_set()
|
inline |
true if all bits are clear
|
inline |
true if all bits are set
|
inline |
true if bit at index idx is set
|
inline |
Updates this bitmap by taking OR with the given bitmap.
|
inline |
return size in bits
|
inline |
|
inline |
return size in words (unsigned long)
|
inline |
OR-together and return merged vector.
OR-together this bitmap with other bitmap and stuff result into merged. Return true if this entire bitmap is found in the other.
|
inline |
|
inline |
set bit at index idx
|
inline |
OR-together and return merged vector.
OR-together this bitmap with other bitmap and stuff result into merged. Return the number of words in which this bitmap is found in the other bitmap.
|
private |
1.8.12