// output of ./demo/ds/bitarray-demo.cc: // Description: //% Demo of the bitarray data structure. void bitarray::dump() const: number of bits: n_ = 67 fully used words: nfw_ = 1 mask for partially used word: mp_ = 7 = .............................................................111 ................................................................... B.set_all() ==> 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 111 [0x ffffffffffffffff] [0x7] B.all_set_q() ==> 1 (1) B.clear_all() ==> ........ ........ ........ ........ ........ ........ ........ ........ ... [0x 0] [0x0] B.all_clear_q() ==> 1 (1) B.set(12) ==> ........ ....1... ........ ........ ........ ........ ........ ........ ... [0x 1000] [0x0] B.set(13) ==> ........ ....11.. ........ ........ ........ ........ ........ ........ ... [0x 3000] [0x0] B.set(33) ==> ........ ....11.. ........ ........ .1...... ........ ........ ........ ... [0x 200003000] [0x0] B.test(42) ==> 0 (0) B.test(43) ==> 0 (0) B.test(44) ==> 0 (0) B.next_set(13) ==> 1 (13) B.next_set(14) ==> 1 (33) B.test(13) ==> 1 (18446744073709551615) B.test(14) ==> 0 (0) B.test_set(24) ==> 0 ........ ....11.. ........ 1....... .1...... ........ ........ ........ ... [0x 201003000] [0x0] B.test_clear(24) ==> 18446744073709551615 ........ ....11.. ........ ........ .1...... ........ ........ ........ ... [0x 200003000] [0x0] B.test_change(24) ==> 0 ........ ....11.. ........ 1....... .1...... ........ ........ ........ ... [0x 201003000] [0x0]