|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.sux4j.bits.SimpleSelectZero
public class SimpleSelectZero
A simple zero-select implementation based on a two-level inventory and broadword bit search.
This implementation uses around 13.75% additional space on evenly distributed bit arrays, and, under the same conditions, provide very fast selects. For very unevenly distributed arrays the space occupancy will grow significantly, and access time might vary wildly.
Constructor Summary | |
---|---|
SimpleSelectZero(BitVector bitVector)
|
|
SimpleSelectZero(long[] bits,
long length)
|
Method Summary | |
---|---|
BitVector |
bitVector()
Returns the bit vector indexed by this structure. |
long |
numBits()
Returns the overall number of bits allocated by this structure. |
long |
selectZero(long rank)
Returns the position of the bit of given rank. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleSelectZero(long[] bits, long length)
public SimpleSelectZero(BitVector bitVector)
Method Detail |
---|
public long selectZero(long rank)
SelectZero
selectZero
in interface SelectZero
rank
- a rank.
public long numBits()
SelectZero
numBits
in interface SelectZero
public BitVector bitVector()
SelectZero
Note that you are not supposed to modify the returned vector.
bitVector
in interface SelectZero
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |