Improved documentation of Murmur3 hash functions.

Added references to Commons Codec and SMHasher.
This commit is contained in:
aherbert 2020-03-12 16:59:40 +00:00
parent 8fb518e6a1
commit 391d91e353
2 changed files with 14 additions and 8 deletions

View File

@ -21,18 +21,20 @@ import org.apache.commons.collections4.bloomfilter.hasher.HashFunction;
/**
* An implementation of HashFunction that
* performs Murmur128 hashing using a signed cyclic method.
* uses an underlying Murmur3 128-bit hash with a signed cyclic method.
*
* <p>Requires the optional commons-codec library.</p>
* <p>Requires the optional <a href="https://commons.apache.org/codec/">Apache Commons Codec</a>
* library which contains a Java port of the 128-bit hash function
* {@code MurmurHash3_x64_128} from Austin Applyby's original {@code c++}
* code in SMHasher.</p>
*
* @see <a href="https://github.com/aappleby/smhasher">SMHasher</a>
* @since 4.5
*/
public final class Murmur128x86Cyclic implements HashFunction {
/**
* The name of this hash method.
*
* <p>TODO: Should this be changed to "Murmur3_128_x64"?
*/
public static final String NAME = "Murmur3_x64_128";

View File

@ -21,18 +21,21 @@ import org.apache.commons.collections4.bloomfilter.hasher.HashFunction;
/**
* An implementation of HashFunction that
* performs Murmur32 hashing using a signed iterative method.
* uses an underlying Murmur3 32-bit hash with a signed iterative method.
*
* <p>Requires the optional commons-codec library.</p>
* <p>Requires the optional <a href="https://commons.apache.org/codec/">Apache Commons Codec</a>
* library which contains a Java port of the 32-bit hash function
* {@code MurmurHash3_x86_32} from Austin Applyby's original {@code c++}
* code in SMHasher.</p>
*
* @see <a href="https://commons.apache.org/codec/">Apache Commons Codec</a>
* @see <a href="https://github.com/aappleby/smhasher">SMHasher</a>
* @since 4.5
*/
public final class Murmur32x86Iterative implements HashFunction {
/**
* The name of this hash function.
*
* <p>TODO: Should this be changed to "Murmur3_32_x86"?
*/
public static final String NAME = "Murmur3_x86_32";
@ -59,6 +62,7 @@ public final class Murmur32x86Iterative implements HashFunction {
public String getName() {
return NAME;
}
@Override
public ProcessType getProcessType() {
return ProcessType.ITERATIVE;