public final class Util extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
fillArrayAND(short[] container,
long[] bitmap1,
long[] bitmap2)
Compute the bitwise AND between two long arrays and write
the set bits in the container.
|
static void |
fillArrayANDNOT(short[] container,
long[] bitmap1,
long[] bitmap2)
Compute the bitwise ANDNOT between two long arrays and write
the set bits in the container.
|
static void |
fillArrayXOR(short[] container,
long[] bitmap1,
long[] bitmap2)
Compute the bitwise XOR between two long arrays and write
the set bits in the container.
|
protected static short |
highbits(int x) |
protected static short |
lowbits(int x) |
protected static short |
maxLowBit() |
static int |
select(int w,
int j)
Given a word w, return the position of the jth true bit.
|
static int |
select(long w,
int j)
Given a word w, return the position of the jth true bit.
|
static int |
select(short w,
int j)
Given a word w, return the position of the jth true bit.
|
protected static int |
toIntUnsigned(short x) |
protected static int |
unsignedBinarySearch(short[] array,
int begin,
int end,
short k) |
static int |
unsignedDifference(short[] set1,
int length1,
short[] set2,
int length2,
short[] buffer)
Compute the difference between two sorted lists and write the result to the provided
output array
|
static int |
unsignedExclusiveUnion2by2(short[] set1,
int length1,
short[] set2,
int length2,
short[] buffer)
Compute the exclusive union of two sorted lists and write the result to the provided
output array
|
static int |
unsignedIntersect2by2(short[] set1,
int length1,
short[] set2,
int length2,
short[] buffer)
Intersect two sorted lists and write the result to the provided
output array
|
protected static int |
unsignedLocalIntersect2by2(short[] set1,
int length1,
short[] set2,
int length2,
short[] buffer) |
protected static int |
unsignedOneSidedGallopingIntersect2by2(short[] smallSet,
int smallLength,
short[] largeSet,
int largeLength,
short[] buffer) |
static int |
unsignedUnion2by2(short[] set1,
int length1,
short[] set2,
int length2,
short[] buffer)
Unite two sorted lists and write the result to the provided
output array
|
public static void fillArrayAND(short[] container,
long[] bitmap1,
long[] bitmap2)
container - where we writebitmap1 - first bitmapbitmap2 - second bitmappublic static void fillArrayANDNOT(short[] container,
long[] bitmap1,
long[] bitmap2)
container - where we writebitmap1 - first bitmapbitmap2 - second bitmappublic static void fillArrayXOR(short[] container,
long[] bitmap1,
long[] bitmap2)
container - where we writebitmap1 - first bitmapbitmap2 - second bitmapprotected static short highbits(int x)
protected static short lowbits(int x)
protected static short maxLowBit()
protected static int toIntUnsigned(short x)
protected static int unsignedBinarySearch(short[] array,
int begin,
int end,
short k)
public static int unsignedDifference(short[] set1,
int length1,
short[] set2,
int length2,
short[] buffer)
set1 - first arraylength1 - length of first arrayset2 - second arraylength2 - length of second arraybuffer - output arraypublic static int unsignedExclusiveUnion2by2(short[] set1,
int length1,
short[] set2,
int length2,
short[] buffer)
set1 - first arraylength1 - length of first arrayset2 - second arraylength2 - length of second arraybuffer - output arraypublic static int unsignedIntersect2by2(short[] set1,
int length1,
short[] set2,
int length2,
short[] buffer)
set1 - first arraylength1 - length of first arrayset2 - second arraylength2 - length of second arraybuffer - output arrayprotected static int unsignedLocalIntersect2by2(short[] set1,
int length1,
short[] set2,
int length2,
short[] buffer)
protected static int unsignedOneSidedGallopingIntersect2by2(short[] smallSet,
int smallLength,
short[] largeSet,
int largeLength,
short[] buffer)
public static int unsignedUnion2by2(short[] set1,
int length1,
short[] set2,
int length2,
short[] buffer)
set1 - first arraylength1 - length of first arrayset2 - second arraylength2 - length of second arraybuffer - output arraypublic static int select(long w,
int j)
w - wordj - indexpublic static int select(int w,
int j)
w - wordj - indexpublic static int select(short w,
int j)
w - wordj - indexCopyright © 2014. All Rights Reserved.