uint64_t next1(uint64_t i) const { uint64_t r = rankm1(i); assert(r < m_ones); return selectp(r+1); }
uint64_t prev1(uint64_t i) const { uint64_t r = rankm1(i+1); assert(r>0); return selectp(r); }
uint64_t rank1(uint64_t const idx) const { return rankm1(idx+1); }
bool operator[](uint64_t const idx) const { uint64_t const r = rankm1(idx+1); return r && (selectp(r) == idx); }
/** * return number of 0 bits up to (and excluding) index i * @param i * @return inverse population count **/ uint64_t rankm0(uint64_t const i) const { return i - rankm1(i); }
inline uint64_t step(uint64_t const k, uint64_t const sp) const { return D[k] + rankm1(k,sp); }