Top Description Fields Constructors Methods
com.carrotsearch.hppc

public Class BitSetIterator

extends Object
Class Inheritance

An iterator to iterate over set bits in an BitSet. This is faster than nextSetBit() for iterating over the complete set of bits, especially when the density of the bits set is high.

Field Summary

Modifier and TypeField and Description
private final long[]
arr

*** the python code that generated bitlist def bits2int(val): arr=0 for shift in range(8,0,-1): if val & 0x80: arr = (arr << 4) | shift val = val << 1 return arr

def int_table(): tbl = [ hex(bits2int(val)).strip('L') for val in range(256) ] return ','.join(tbl) ****

pack-priv static final int[]
private int
i

private int
public static final int
private long
private final int
private int

Constructor Summary

AccessConstructor and Description
public
public
BitSetIterator(long[] bits, int numWords)

Method Summary

Modifier and TypeMethod and Description
public int
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

arrback to summary
private final long[] arr

*** the python code that generated bitlist def bits2int(val): arr=0 for shift in range(8,0,-1): if val & 0x80: arr = (arr << 4) | shift val = val << 1 return arr

def int_table(): tbl = [ hex(bits2int(val)).strip('L') for val in range(256) ] return ','.join(tbl) ****

bitlistback to summary
pack-priv static final int[] bitlist
iback to summary
private int i
indexArrayback to summary
private int indexArray
NO_MOREback to summary
public static final int NO_MORE
wordback to summary
private long word
wordsback to summary
private final int words
wordShiftback to summary
private int wordShift

Constructor Detail

BitSetIteratorback to summary
public BitSetIterator(BitSet obs)
BitSetIteratorback to summary
public BitSetIterator(long[] bits, int numWords)

Method Detail

nextSetBitback to summary
public int nextSetBit()
shiftback to summary
private void shift()