|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.dev.hash.MinimalPerfectHash.StringHash
public static class MinimalPerfectHash.StringHash
A sample hash implementation for integer keys.
| Constructor Summary | |
|---|---|
MinimalPerfectHash.StringHash()
|
|
| Method Summary | |
|---|---|
static int |
getFastHash(java.lang.String o,
int index,
int seed)
A cryptographically weak hash function. |
static int |
getSipHash24(byte[] b,
int start,
int end,
long k0,
long k1)
A cryptographically relatively secure hash function. |
static int |
getSipHash24(java.lang.String o,
long k0,
long k1)
A cryptographically relatively secure hash function. |
int |
hashCode(java.lang.String o,
int index,
int seed)
Calculate the hash of the given object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MinimalPerfectHash.StringHash()
| Method Detail |
|---|
public int hashCode(java.lang.String o,
int index,
int seed)
MinimalPerfectHash.UniversalHash
hashCode in interface MinimalPerfectHash.UniversalHash<java.lang.String>o - the objectindex - the hash function index (index 0 is used first, so the
method should be very fast with index 0; index 1 and so on
are only called when really needed)seed - the random seed (always the same for a hash table)
public static int getFastHash(java.lang.String o,
int index,
int seed)
o - the stringindex - the hash function indexseed - the seed
public static int getSipHash24(java.lang.String o,
long k0,
long k1)
o - the stringk0 - key 0k1 - key 1
public static int getSipHash24(byte[] b,
int start,
int end,
long k0,
long k1)
b - the datastart - the start positionend - the end position plus onek0 - key 0k1 - key 1
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||