Return the first set bit in the bitmap. Return -1 if no bits are set.
| 1117 | |
| 1118 | // Return the first set bit in the bitmap. Return -1 if no bits are set. |
| 1119 | int find_first() const |
| 1120 | { |
| 1121 | if (Elements.empty()) |
| 1122 | return -1; |
| 1123 | const SparseBitVectorElement<ElementSize> &First = *(Elements.begin()); |
| 1124 | return (First.index() * ElementSize) + First.find_first(); |
| 1125 | } |
| 1126 | |
| 1127 | // Return the last set bit in the bitmap. Return -1 if no bits are set. |
| 1128 | int find_last() const |
no test coverage detected