Return the last set bit in the bitmap. Return -1 if no bits are set.
| 1126 | |
| 1127 | // Return the last set bit in the bitmap. Return -1 if no bits are set. |
| 1128 | int find_last() const |
| 1129 | { |
| 1130 | if (Elements.empty()) |
| 1131 | return -1; |
| 1132 | const SparseBitVectorElement<ElementSize> &Last = *(Elements.rbegin()); |
| 1133 | return (Last.index() * ElementSize) + Last.find_last(); |
| 1134 | } |
| 1135 | |
| 1136 | // Return true if the SparseBitVector is empty |
| 1137 | bool empty() const |
no test coverage detected