public class IntPerfectHash
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
IntPerfectHash.BitArray
A helper class for bit arrays.
|
| Constructor and Description |
|---|
IntPerfectHash(byte[] data)
Create a hash object to convert keys to hashes.
|
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
generate(java.util.ArrayList<java.lang.Integer> list)
Generate the minimal perfect hash function data from the given list.
|
int |
get(int x)
Calculate the hash value for the given key.
|
byte[] |
getData()
Get the hash function description.
|
public IntPerfectHash(byte[] data)
data - the data returned by the generate methodpublic byte[] getData()
public int get(int x)
x - the keypublic static byte[] generate(java.util.ArrayList<java.lang.Integer> list)
list - the data