You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2020/03/14 14:21:56 UTC
[commons-collections] 13/20: Improved documentation of Murmur3 hash
functions.
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 391d91e3535cdb370d6cc69e04aef506813cc47b
Author: aherbert <a....@sussex.ac.uk>
AuthorDate: Thu Mar 12 16:59:40 2020 +0000
Improved documentation of Murmur3 hash functions.
Added references to Commons Codec and SMHasher.
---
.../bloomfilter/hasher/function/Murmur128x86Cyclic.java | 10 ++++++----
.../bloomfilter/hasher/function/Murmur32x86Iterative.java | 12 ++++++++----
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86Cyclic.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86Cyclic.java
index fbd8cb5..d3137d0 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86Cyclic.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur128x86Cyclic.java
@@ -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";
diff --git a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86Iterative.java b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86Iterative.java
index 2cad018..982ef5c 100644
--- a/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86Iterative.java
+++ b/src/main/java/org/apache/commons/collections4/bloomfilter/hasher/function/Murmur32x86Iterative.java
@@ -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;