Пример #1
0
			uint64_t next1(uint64_t i) const 
			{
				uint64_t r = rankm1(i);
				assert(r < m_ones);
				return selectp(r+1);
			}                                    
Пример #2
0
			uint64_t prev1(uint64_t i) const 
			{
				uint64_t r = rankm1(i+1);
				assert(r>0);
				return selectp(r);
			}
Пример #3
0
			uint64_t rank1(uint64_t const idx) const
			{
				return rankm1(idx+1);
			}
Пример #4
0
			bool operator[](uint64_t const idx) const
			{
				uint64_t const r = rankm1(idx+1);
				return r && (selectp(r) == idx);
			}
Пример #5
0
			/**
			 * 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);
			}
Пример #6
0
			inline uint64_t step(uint64_t const k, uint64_t const sp) const { return D[k] + rankm1(k,sp); }