Return the last set bit in the bitmap. Return -1 if no bits are set.
| 785 | |
| 786 | // Return the last set bit in the bitmap. Return -1 if no bits are set. |
| 787 | int find_last() const { |
| 788 | if (Elements.empty()) |
| 789 | return -1; |
| 790 | const SparseBitVectorElement<ElementSize> &Last = *(Elements.rbegin()); |
| 791 | return (Last.index() * ElementSize) + Last.find_last(); |
| 792 | } |
| 793 | |
| 794 | // Return true if the SparseBitVector is empty |
| 795 | bool empty() const { |