Package com.carrotsearch.hppc
Interface HashOrderMixingStrategy
-
- All Superinterfaces:
java.lang.Cloneable
- All Known Implementing Classes:
RandomizedHashOrderMixer
public interface HashOrderMixingStrategy extends java.lang.Cloneable
Hash order mixing strategy implementations should provide an, ideally, random integer that is later XORed with the hash of a given key before the slot lookup in associative arrays.Why good hash mixing is important is explained in the differences between hash and scatter sets.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description HashOrderMixingStrategy
clone()
int
newKeyMixer(int newContainerBufferSize)
A new key mixer value.
-
-
-
Method Detail
-
newKeyMixer
int newKeyMixer(int newContainerBufferSize)
A new key mixer value. The value can be derived from the new buffer size of the container, but preferably should be random and unique.- Parameters:
newContainerBufferSize
-
-
clone
HashOrderMixingStrategy clone()
- Returns:
- Return a clone of this strategy. This should use a different mixing because cloned containers should have a different hash ordering.
-
-