public class SimpleSelect extends Object implements Select
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 and Description |
|---|
SimpleSelect(BitVector bitVector)
Creates a new selection structure using the specified bit vector.
|
SimpleSelect(long[] bits,
long length)
Creates a new selection structure using a bit vector specified by an array of longs and a number of bits.
|
public SimpleSelect(long[] bits,
long length)
bits - an array of longs representing a bit array.length - the number of bits to use from bits.public SimpleSelect(BitVector bitVector)
bitVector - a bit vector.public long select(long rank)
Selectpublic long numBits()
SelectnumBits in interface Select