public final class SparseArray extends Object
| Constructor and Description |
|---|
SparseArray() |
| Modifier and Type | Method and Description |
|---|---|
static int |
countUnique(int[] buffer,
int fromIndex,
int toIndex)
Count unique values in the sorted array.
|
static int[] |
mergeSparseArrays(Iterable<int[]> source)
Merge data from one or more sparse arrays.
|
static String |
sparseToString(int[] intIntArray)
Convert an int-int compact mapping array to a string.
|
static int[] |
toSparseEncoding(com.carrotsearch.hppc.IntStack documents)
Convert a list of documents to sparse document-count representation.
|
static int[] |
toSparseEncodingByHash(com.carrotsearch.hppc.IntStack documents)
Convert to sparse encoding using a hash map.
|
static int[] |
toSparseEncodingBySort(com.carrotsearch.hppc.IntStack documents)
Convert to sparse encoding using sorting and counting.
|
public static int[] toSparseEncoding(com.carrotsearch.hppc.IntStack documents)
public static int[] toSparseEncodingByHash(com.carrotsearch.hppc.IntStack documents)
public static int[] toSparseEncodingBySort(com.carrotsearch.hppc.IntStack documents)
public static int countUnique(int[] buffer,
int fromIndex,
int toIndex)
public static int[] mergeSparseArrays(Iterable<int[]> source)
public static String sparseToString(int[] intIntArray)