public final class BufferUtil
extends java.lang.Object
| 限定符和类型 | 方法和说明 |
|---|---|
static MappeableContainer[] |
addOffset(MappeableContainer source,
char offsets)
Add value "offset" to all values in the container, producing
two new containers.
|
protected static int |
advanceUntil(java.nio.CharBuffer array,
int pos,
int length,
char min)
Find the smallest integer larger than pos such that array[pos]>= min.
|
protected static void |
arraycopy(java.nio.CharBuffer src,
int srcPos,
java.nio.CharBuffer dest,
int destPos,
int length) |
protected static int |
branchyUnsignedBinarySearch(java.nio.ByteBuffer array,
int position,
int begin,
int end,
char k) |
protected static int |
branchyUnsignedBinarySearch(java.nio.CharBuffer array,
int begin,
int end,
char k) |
static int |
cardinalityInBitmapRange(java.nio.LongBuffer bitmap,
int start,
int end)
Hamming weight of the bitset in the range
start, start+1,..., end-1
|
protected static void |
fillArrayAND(char[] container,
java.nio.LongBuffer bitmap1,
java.nio.LongBuffer bitmap2) |
protected static void |
fillArrayANDNOT(char[] container,
java.nio.LongBuffer bitmap1,
java.nio.LongBuffer bitmap2) |
protected static void |
fillArrayXOR(char[] container,
java.nio.LongBuffer bitmap1,
java.nio.LongBuffer bitmap2) |
static void |
flipBitmapRange(java.nio.LongBuffer bitmap,
int start,
int end)
flip bits at start, start+1,..., end-1
|
static int |
flipBitmapRangeAndCardinalityChange(java.nio.LongBuffer bitmap,
int start,
int end)
已过时。
|
protected static int |
getSizeInBytesFromCardinalityEtc(int card,
int numRuns,
boolean isRunEncoded)
From the cardinality of a container, compute the corresponding size in bytes of the container.
|
protected static char |
highbits(int x) |
protected static char |
highbits(long x) |
static int |
intersectArrayIntoBitmap(long[] bitmap,
java.nio.CharBuffer array,
int length)
Intersects the bitmap with the array, returning the cardinality of the result
|
static int |
intersectArrayIntoBitmap(java.nio.LongBuffer bitmap,
java.nio.CharBuffer array,
int length)
Intersects the bitmap with the array, returning the cardinality of the result
|
protected static boolean |
isBackedBySimpleArray(java.nio.Buffer b)
Checks whether the Buffer is backed by a simple array.
|
static int |
iterateUntil(java.nio.CharBuffer array,
int pos,
int length,
int min)
Find the smallest integer larger than pos such that array[pos]>= min.
|
protected static char |
lowbits(int x) |
protected static char |
lowbits(long x) |
protected static int |
lowbitsAsInteger(long x) |
protected static char |
maxLowBit() |
protected static int |
maxLowBitAsInteger() |
static void |
resetBitmapRange(java.nio.LongBuffer bitmap,
int start,
int end)
clear bits at start, start+1,..., end-1
|
static int |
resetBitmapRangeAndCardinalityChange(java.nio.LongBuffer bitmap,
int start,
int end)
已过时。
|
static void |
setBitmapRange(java.nio.LongBuffer bitmap,
int start,
int end)
set bits at start, start+1,..., end-1
|
static int |
setBitmapRangeAndCardinalityChange(java.nio.LongBuffer bitmap,
int start,
int end)
已过时。
|
static int |
unsignedBinarySearch(java.nio.ByteBuffer array,
int position,
int begin,
int end,
char k)
Look for value k in buffer in the range [begin,end).
|
static int |
unsignedBinarySearch(java.nio.CharBuffer array,
int begin,
int end,
char k)
Look for value k in buffer in the range [begin,end).
|
protected static int |
unsignedDifference(java.nio.CharBuffer set1,
int length1,
java.nio.CharBuffer set2,
int length2,
char[] buffer) |
protected static int |
unsignedExclusiveUnion2by2(java.nio.CharBuffer set1,
int length1,
java.nio.CharBuffer set2,
int length2,
char[] buffer) |
protected static int |
unsignedIntersect2by2(java.nio.CharBuffer set1,
int length1,
java.nio.CharBuffer set2,
int length2,
char[] buffer) |
static boolean |
unsignedIntersects(java.nio.CharBuffer set1,
int length1,
java.nio.CharBuffer set2,
int length2)
Checks if two arrays intersect
|
protected static int |
unsignedLocalIntersect2by2(java.nio.CharBuffer set1,
int length1,
java.nio.CharBuffer set2,
int length2,
char[] buffer) |
protected static int |
unsignedLocalIntersect2by2Cardinality(java.nio.CharBuffer set1,
int length1,
java.nio.CharBuffer set2,
int length2) |
protected static int |
unsignedOneSidedGallopingIntersect2by2(java.nio.CharBuffer smallSet,
int smallLength,
java.nio.CharBuffer largeSet,
int largeLength,
char[] buffer) |
protected static int |
unsignedUnion2by2(java.nio.CharBuffer set1,
int offset1,
int length1,
java.nio.CharBuffer set2,
int offset2,
int length2,
char[] buffer) |
public static MappeableContainer[] addOffset(MappeableContainer source, char offsets)
source - source containeroffsets - value to add to each value in the containerprotected static int advanceUntil(java.nio.CharBuffer array,
int pos,
int length,
char min)
array - container where we searchpos - initial positionmin - minimal thresholdlength - how big should the array consider to bepublic static int iterateUntil(java.nio.CharBuffer array,
int pos,
int length,
int min)
array - array to search withinpos - starting position of the searchlength - length of the array to searchmin - minimum valueprotected static void arraycopy(java.nio.CharBuffer src,
int srcPos,
java.nio.CharBuffer dest,
int destPos,
int length)
protected static int branchyUnsignedBinarySearch(java.nio.CharBuffer array,
int begin,
int end,
char k)
protected static int branchyUnsignedBinarySearch(java.nio.ByteBuffer array,
int position,
int begin,
int end,
char k)
protected static void fillArrayAND(char[] container,
java.nio.LongBuffer bitmap1,
java.nio.LongBuffer bitmap2)
protected static void fillArrayANDNOT(char[] container,
java.nio.LongBuffer bitmap1,
java.nio.LongBuffer bitmap2)
protected static void fillArrayXOR(char[] container,
java.nio.LongBuffer bitmap1,
java.nio.LongBuffer bitmap2)
public static void flipBitmapRange(java.nio.LongBuffer bitmap,
int start,
int end)
bitmap - array of words to be modifiedstart - first index to be modified (inclusive)end - last index to be modified (exclusive)public static int cardinalityInBitmapRange(java.nio.LongBuffer bitmap,
int start,
int end)
bitmap - array of words representing a bitsetstart - first index (inclusive)end - last index (exclusive)@Deprecated
public static int setBitmapRangeAndCardinalityChange(java.nio.LongBuffer bitmap,
int start,
int end)
bitmap - array of words to be modifiedstart - first index to be modified (inclusive)end - last index to be modified (exclusive)@Deprecated
public static int flipBitmapRangeAndCardinalityChange(java.nio.LongBuffer bitmap,
int start,
int end)
bitmap - array of words to be modifiedstart - first index to be modified (inclusive)end - last index to be modified (exclusive)@Deprecated
public static int resetBitmapRangeAndCardinalityChange(java.nio.LongBuffer bitmap,
int start,
int end)
bitmap - array of words to be modifiedstart - first index to be modified (inclusive)end - last index to be modified (exclusive)protected static int getSizeInBytesFromCardinalityEtc(int card,
int numRuns,
boolean isRunEncoded)
card - the cardinality if this is not run encoded, otherwise ignorednumRuns - number of runs if run encoded, othewise ignoredisRunEncoded - booleanprotected static char highbits(int x)
protected static char highbits(long x)
protected static boolean isBackedBySimpleArray(java.nio.Buffer b)
b - the provided Bufferprotected static char lowbits(int x)
protected static char lowbits(long x)
protected static int lowbitsAsInteger(long x)
protected static char maxLowBit()
protected static int maxLowBitAsInteger()
public static void resetBitmapRange(java.nio.LongBuffer bitmap,
int start,
int end)
bitmap - array of words to be modifiedstart - first index to be modified (inclusive)end - last index to be modified (exclusive)public static void setBitmapRange(java.nio.LongBuffer bitmap,
int start,
int end)
bitmap - array of words to be modifiedstart - first index to be modified (inclusive)end - last index to be modified (exclusive)public static int unsignedBinarySearch(java.nio.CharBuffer array,
int begin,
int end,
char k)
array - buffer where we searchbegin - first index (inclusive)end - last index (exclusive)k - value we search forpublic static int unsignedBinarySearch(java.nio.ByteBuffer array,
int position,
int begin,
int end,
char k)
array - buffer where we searchposition - starting position of the container in the ByteBufferbegin - first index (inclusive)end - last index (exclusive)k - value we search forprotected static int unsignedDifference(java.nio.CharBuffer set1,
int length1,
java.nio.CharBuffer set2,
int length2,
char[] buffer)
public static int intersectArrayIntoBitmap(long[] bitmap,
java.nio.CharBuffer array,
int length)
bitmap - the bitmap, modifiedarray - the array, not modifiedlength - how much of the array to consumepublic static int intersectArrayIntoBitmap(java.nio.LongBuffer bitmap,
java.nio.CharBuffer array,
int length)
bitmap - the bitmap, modifiedarray - the array, not modifiedlength - how much of the array to consumeprotected static int unsignedExclusiveUnion2by2(java.nio.CharBuffer set1,
int length1,
java.nio.CharBuffer set2,
int length2,
char[] buffer)
protected static int unsignedIntersect2by2(java.nio.CharBuffer set1,
int length1,
java.nio.CharBuffer set2,
int length2,
char[] buffer)
public static boolean unsignedIntersects(java.nio.CharBuffer set1,
int length1,
java.nio.CharBuffer set2,
int length2)
set1 - first arraylength1 - length of first arrayset2 - second arraylength2 - length of second arrayprotected static int unsignedLocalIntersect2by2(java.nio.CharBuffer set1,
int length1,
java.nio.CharBuffer set2,
int length2,
char[] buffer)
protected static int unsignedLocalIntersect2by2Cardinality(java.nio.CharBuffer set1,
int length1,
java.nio.CharBuffer set2,
int length2)
protected static int unsignedOneSidedGallopingIntersect2by2(java.nio.CharBuffer smallSet,
int smallLength,
java.nio.CharBuffer largeSet,
int largeLength,
char[] buffer)
protected static int unsignedUnion2by2(java.nio.CharBuffer set1,
int offset1,
int length1,
java.nio.CharBuffer set2,
int offset2,
int length2,
char[] buffer)