Package tools.refinery.store.model
Class TupleHashProvider
java.lang.Object
tools.refinery.store.model.TupleHashProvider
- All Implemented Interfaces:
ContinuousHashProvider<Tuple>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TupleHashProviderprotected static final intprotected static final intprotected static final longstatic final intprotected static final int[]Fields inherited from interface tools.refinery.store.map.ContinuousHashProvider
EFFECTIVE_BIT_MASK, EFFECTIVE_BITS, MAX_PRACTICAL_DEPTH -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:ContinuousHashProviderProvides a hash code for a objectkeywith a givenindex. It has the following contracts:- If
equals(key1, key2), thengetHash(key1, index) == getHash(key2, index)for all values ofindex. - If
getHash(key1,index) == getHash(key2, index)for all values ofindex, thenequals(key1, key2) - In current implementation, we use only the least significant
ContinuousHashProvider.EFFECTIVE_BITS
Object.equals(Object)for further details.- Specified by:
getHashin 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
-