(x uint32)
| 216 | } |
| 217 | |
| 218 | func (ra *roaringArray64) getIndex(x uint32) int { |
| 219 | // before the binary search, we optimize for frequent cases |
| 220 | size := len(ra.keys) |
| 221 | if (size == 0) || (ra.keys[size-1] == x) { |
| 222 | return size - 1 |
| 223 | } |
| 224 | return ra.binarySearch(0, int64(size), x) |
| 225 | } |
| 226 | |
| 227 | func (ra *roaringArray64) getKeyAtIndex(i int) uint32 { |
| 228 | return ra.keys[i] |
no test coverage detected