Package com.carrotsearch.hppc
Interface HashOrderMixingStrategy
- All Superinterfaces:
Cloneable
- All Known Implementing Classes:
RandomizedHashOrderMixer
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.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionclone()
int
newKeyMixer
(int newContainerBufferSize) A new key mixer value.
-
Method Details
-
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.
-