|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.dev.hash.IntPerfectHash
public class IntPerfectHash
A minimum perfect hash function tool. It needs about 2.2 bits per key.
| Nested Class Summary | |
|---|---|
static class |
IntPerfectHash.BitArray
A helper class for bit arrays. |
| Constructor Summary | |
|---|---|
IntPerfectHash(byte[] data)
Create a hash object to convert keys to hashes. |
|
| Method Summary | ||
|---|---|---|
static
|
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. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IntPerfectHash(byte[] data)
data - the data returned by the generate method| Method Detail |
|---|
public byte[] getData()
public int get(int x)
x - the key
public static <K> byte[] generate(java.util.ArrayList<java.lang.Integer> list)
list - the data
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||