// output of ./demo/ds/bitarray-demo.cc: // Description: //% Demo of the bitarray data structure. void bitarray::dump() const: number of bits: n_ = 60 fully used words: nfw_ = 0 mask for partially used word: mp_ = 1152921504606846975 ............................................................ ba.set_all() ==> 11111111 11111111 11111111 11111111 11111111 11111111 11111111 1111 [0xffffffffffffffff] ba.all_set_q() ==> 1 (1) ba.clear_all() ==> ........ ........ ........ ........ ........ ........ ........ .... [0x0] ba.all_clear_q() ==> 1 (1) ba.set(12) ==> ........ ....1... ........ ........ ........ ........ ........ .... [0x1000] ba.set(13) ==> ........ ....11.. ........ ........ ........ ........ ........ .... [0x3000] ba.set(33) ==> ........ ....11.. ........ ........ .1...... ........ ........ .... [0x200003000] ba.test(42) ==> 0 (0) ba.test(43) ==> 0 (0) ba.test(44) ==> 0 (0) ba.next_set(13) ==> 1 (13) ba.next_set(14) ==> 1 (33) ba.test(13) ==> 1 (18446744073709551615) ba.test(14) ==> 0 (0) ba.test_set(24) ==> 0 ........ ....11.. ........ 1....... .1...... ........ ........ .... [0x201003000] ba.test_clear(24) ==> 18446744073709551615 ........ ....11.. ........ ........ .1...... ........ ........ .... [0x200003000] ba.test_change(24) ==> 0 ........ ....11.. ........ 1....... .1...... ........ ........ .... [0x201003000]