|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.sux4j.mph.Hashes
public class Hashes
Basic hash functions.
Method Summary | |
---|---|
static long |
jenkins(BitVector bv)
Jenkins 64-bit hashing. |
static long |
jenkins(BitVector bv,
long seed)
Jenkins 64-bit hashing. |
static void |
jenkins(BitVector bv,
long seed,
long[] h)
Jenkins 64-bit hashing (all three values produced). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void jenkins(BitVector bv, long seed, long[] h)
This code is based on the lookup8.c, and in particular on the version consuming 64 bits at a time, but it has been slightly modified to work correctly with any bit vector length (not just multiples of 64). Moreover, we return all three values generated by the algorithm.
bv
- a bit vector.seed
- a seed for the hash.h
- a triple of long values in which the three generated hashes will be saved.public static long jenkins(BitVector bv, long seed)
bv
- a bit vector.seed
- a seed for the hash.
jenkins(BitVector, long, long[])
.public static long jenkins(BitVector bv)
bv
- a bit vector.
jenkins(BitVector, long, long[])
with seed 0.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |