|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.lucene.util.BroadWord
public final class BroadWord
Methods and constants inspired by the article "Broadword Implementation of Rank/Select Queries" by Sebastiano Vigna, January 30, 2012:
rank9(long), count of set bits in a long
select9(long, int), selection of a set bit in a long,
smallerUpTo7_8(long,long).
smallerUpto15_16(long,long).
L8_L, H8 H8_L, L9 L9_L, L16 L16_Land H16 H8_L.
| Field Summary | |
|---|---|
static long |
H16_L
|
static long |
H8_L
Hk = Lk << (k-1) . |
static long |
L16_L
|
static long |
L8_L
Lk denotes the constant whose ones are in position 0, k, 2k, . |
static long |
L9_L
|
| Method Summary | |
|---|---|
static long |
notEquals0_8(long x)
An unsigned bytewise not equals 0 operator. |
static int |
select9(long x,
int r)
Select a 1-bit from a long. |
static int |
selectNaive(long x,
int r)
Naive implementation of select9(long,int), using Long.numberOfTrailingZeros(long) repetitively. |
static long |
smalleru_8(long x,
long y)
An unsigned bytewise smaller <8 operator. |
static long |
smallerUpto15_16(long x,
long y)
A bytewise smaller <16 operator. |
static long |
smallerUpTo7_8(long x,
long y)
A signed bytewise smaller <8 operator, for operands 0L<= x, y <=0x7L. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long L8_L
public static final long L9_L
public static final long L16_L
public static final long H8_L
public static final long H16_L
| Method Detail |
|---|
public static int select9(long x,
int r)
public static long smallerUpTo7_8(long x,
long y)
H8_L positions corresponding to each input signed byte pair that compares smaller.
public static long smalleru_8(long x,
long y)
H8_L positions corresponding to each input unsigned byte pair that compares smaller.public static long notEquals0_8(long x)
H8_L positions corresponding to each unsigned byte that does not equal 0.
public static long smallerUpto15_16(long x,
long y)
H16_L positions corresponding to each input signed short pair that compares smaller.
public static int selectNaive(long x,
int r)
select9(long,int), using Long.numberOfTrailingZeros(long) repetitively.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||