Resizes the vector to new size and sets all bits to `value`.
| 93 | |
| 94 | /// Resizes the vector to new size and sets all bits to `value`. |
| 95 | void resizeFill(int32_t size, bool value = true) { |
| 96 | auto numWords = bits::nwords(size); |
| 97 | bits_.resize(numWords); |
| 98 | std::fill(bits_.begin(), bits_.end(), value ? ~0LL : 0); |
| 99 | size_ = size; |
| 100 | begin_ = 0; |
| 101 | end_ = value ? size_ : 0; |
| 102 | allSelected_ = value; |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * Set whether given index is selected. updateBounds() need to be called |