OpenBitSetIterator
instead.@Deprecated
public class BitSetIterator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private long[] |
arr
Deprecated.
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)
|
protected static int[] |
bitlist
Deprecated.
|
private int |
i
Deprecated.
|
private int |
indexArray
Deprecated.
|
private long |
word
Deprecated.
|
private int |
words
Deprecated.
|
private int |
wordShift
Deprecated.
|
Constructor and Description |
---|
BitSetIterator(long[] bits,
int numWords)
Deprecated.
|
BitSetIterator(org.apache.lucene.util.OpenBitSet obs)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
int |
next()
Deprecated.
alternate shift implementations
// 32 bit shifts, but a long shift needed at the end
private void shift2() {
int y = (int)word;
if (y==0) {wordShift +=32; y = (int)(word >>>32); }
if ((y & 0x0000FFFF) == 0) { wordShift +=16; y>>>=16; }
if ((y & 0x000000FF) == 0) { wordShift +=8; y>>>=8; }
indexArray = bitlist[y & 0xff];
word >>>= (wordShift +1);
}
private void shift3() {
int lower = (int)word;
int lowByte = lower & 0xff;
if (lowByte != 0) {
indexArray=bitlist[lowByte];
return;
}
shift();
}
|
int |
next(int fromIndex)
Deprecated.
|
private void |
shift()
Deprecated.
|
protected static final int[] bitlist
private final long[] arr
private final int words
private int i
private long word
private int wordShift
private int indexArray
public BitSetIterator(org.apache.lucene.util.OpenBitSet obs)
public BitSetIterator(long[] bits, int numWords)
private void shift()
public int next()
public int next(int fromIndex)