Package tools.refinery.store.model
Class TupleHashProvider
java.lang.Object
tools.refinery.store.model.TupleHashProvider
- All Implemented Interfaces:
ContinuousHashProvider<Tuple>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final TupleHashProvider
protected static final int
protected static final int
protected static final long
static final int
protected static final int[]
Fields inherited from interface tools.refinery.store.map.ContinuousHashProvider
EFFECTIVE_BIT_MASK, EFFECTIVE_BITS, MAX_PRACTICAL_DEPTH
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface tools.refinery.store.map.ContinuousHashProvider
compare, getEffectiveHash
-
Field Details
-
primes
protected static final int[] primes -
LARGEST_PRIME_30_BITS_LONG
protected static final long LARGEST_PRIME_30_BITS_LONG- See Also:
-
LARGEST_PRIME_30_BITS_INTEGER
protected static final int LARGEST_PRIME_30_BITS_INTEGER- See Also:
-
LARGEST_BINARY_INDEX_1
protected static final int LARGEST_BINARY_INDEX_1- See Also:
-
MAX_MODEL_SIZE
public static final int MAX_MODEL_SIZE- See Also:
-
INSTANCE
-
-
Constructor Details
-
TupleHashProvider
public TupleHashProvider()
-
-
Method Details
-
getHash
Description copied from interface:ContinuousHashProvider
Provides a hash code for a objectkey
with a givenindex
. It has the following contracts:- If
invalid reference
#equals
(key1,key2)
, thengetHash(key1, index) == getHash(key2, index)
for all values ofindex
. - If
getHash(key1,index) == getHash(key2, index)
for all values ofindex
, theninvalid reference
#equals
(key1, key2)
- In current implementation, we use only the least significant
ContinuousHashProvider.EFFECTIVE_BITS
invalid reference
#equals
- Specified by:
getHash
in interfaceContinuousHashProvider<Tuple>
- Parameters:
key
- The target data object.index
- The depth of the hash code. Needs to be non-negative.- Returns:
- A hash code.
- If
-