public class SimpleSelectZero extends Object implements SelectZero
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.
An additional bulk method makes it possible
to select several consecutive bits at high speed, if the array is reasonably uniform. This is
the typical case when this structure is backing an EliasFanoMonotoneLongBigList
.
Constructor and Description 

SimpleSelectZero(BitVector bitVector)
Creates a new selection structure using the specified bit vector.

SimpleSelectZero(long[] bits,
long length)
Creates a new selection structure using a bit vector specified by an array of longs and a number of bits.

Modifier and Type  Method and Description 

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 zero rank.

long[] 
selectZero(long rank,
long[] dest)
Performs a bulk select of consecutive ranks into a given array.

long[] 
selectZero(long rank,
long[] dest,
int offset,
int length)
Performs a bulk select of consecutive ranks into a given array fragment.

public SimpleSelectZero(long[] bits, long length)
bits
 an array of longs representing a bit array.length
 the number of bits to use from bits
.public SimpleSelectZero(BitVector bitVector)
bitVector
 a bit vector.public long selectZero(long rank)
SelectZero
selectZero
in interface SelectZero
rank
 a zero rank.public long[] selectZero(long rank, long[] dest, int offset, int length)
rank
 the first rank to select.dest
 the destination array; it will be filled with length
positions of consecutive bits starting at position offset
.offset
 the first bit position written in dest
.length
 the number of bit positions in dest
starting at offset
.dest
selectZero(long, long[])
public long[] selectZero(long rank, long[] dest)
rank
 the first rank to select.dest
 the destination array; it will be filled with position of consecutive bits.dest
selectZero(long, long[], int, int)
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