| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (9) on Fri Oct 01 19:18:47 PDT 2021 --> |
| <title>MurmurHash3 (datasketches-java 3.1.0-SNAPSHOT API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="date" content="2021-10-01"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../jquery/jquery-1.10.2.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="MurmurHash3 (datasketches-java 3.1.0-SNAPSHOT API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../";loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/MurmurHash3.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li>Prev Class</li> |
| <li><a href="../../../../org/apache/datasketches/hash/MurmurHash3Adaptor.html" title="class in org.apache.datasketches.hash"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/datasketches/hash/MurmurHash3.html" target="_top">Frames</a></li> |
| <li><a href="MurmurHash3.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><span>SEARCH: </span> |
| <input type="text" id="search" value=" " disabled="disabled"> |
| <input type="reset" id="reset" value=" " disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="../../../../org/apache/datasketches/hash/package-summary.html">org.apache.datasketches.hash</a></div> |
| <h2 title="Class MurmurHash3" class="title">Class MurmurHash3</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.datasketches.hash.MurmurHash3</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="https://docs.oracle.com/javase/9/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></code></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public final class <span class="typeNameLabel">MurmurHash3</span> |
| extends <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> |
| implements <a href="https://docs.oracle.com/javase/9/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a></pre> |
| <div class="block"><p> |
| The MurmurHash3 is a fast, non-cryptographic, 128-bit hash function that has |
| excellent avalanche and 2-way bit independence properties. |
| </p> |
| |
| <p> |
| Austin Appleby's C++ |
| <a href="https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp"> |
| MurmurHash3_x64_128(...), final revision 150</a>, |
| which is in the Public Domain, was the inspiration for this implementation in Java. |
| </p> |
| |
| <p> |
| This java implementation pays close attention to the C++ algorithms in order to |
| maintain bit-wise compatibility, but the design is quite different. This implementation has also |
| been extended to include processing of arrays of longs, char or ints, which was not part of the |
| original C++ implementation. This implementation produces the same exact output hash bits as |
| the above C++ method given the same input.</p> |
| |
| <p>In addition, with this implementation, the hash of byte[], char[], int[], or long[] will |
| produce the same hash result if, and only if, all the arrays have the same exact length in |
| bytes, and if the contents of the values in the arrays have the same byte endianness and |
| overall order. There is a unit test for this class that demonstrates this.</p> |
| |
| <p> |
| The structure of this implementation also reflects a separation of code that is dependent on the |
| input structure (in this case byte[], int[] or long[]) from code that is independent of the input |
| structure. This also makes the code more readable and suitable for future extensions. |
| </p> |
| |
| <p>Note that even though this hash function produces 128 bits, the entropy of the resulting hash cannot |
| be greater than the entropy of the input. For example, if the input is only a single long of 64 bits, |
| the entropy of the resulting 128 bit hash is no greater than 64 bits.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Author:</span></dt> |
| <dd>Lee Rhodes</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../serialized-form.html#org.apache.datasketches.hash.MurmurHash3">Serialized Form</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static long[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/hash/MurmurHash3.html#hash-byte:A-int-int-long-">hash</a></span>​(byte[] key, |
| int offsetBytes, |
| int lengthBytes, |
| long seed)</code></th> |
| <td class="colLast"> |
| <div class="block">Hash a portion of the given byte[] array.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static long[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/hash/MurmurHash3.html#hash-byte:A-long-">hash</a></span>​(byte[] key, |
| long seed)</code></th> |
| <td class="colLast"> |
| <div class="block">Hash the given byte[] array.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static long[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/hash/MurmurHash3.html#hash-char:A-int-int-long-">hash</a></span>​(char[] key, |
| int offsetChars, |
| int lengthChars, |
| long seed)</code></th> |
| <td class="colLast"> |
| <div class="block">Hash a portion of the given char[] array.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static long[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/hash/MurmurHash3.html#hash-char:A-long-">hash</a></span>​(char[] key, |
| long seed)</code></th> |
| <td class="colLast"> |
| <div class="block">Hash the given char[] array.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static long[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/hash/MurmurHash3.html#hash-int:A-int-int-long-">hash</a></span>​(int[] key, |
| int offsetInts, |
| int lengthInts, |
| long seed)</code></th> |
| <td class="colLast"> |
| <div class="block">Hash a portion of the given int[] array.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static long[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/hash/MurmurHash3.html#hash-int:A-long-">hash</a></span>​(int[] key, |
| long seed)</code></th> |
| <td class="colLast"> |
| <div class="block">Hash the given int[] array.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static long[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/hash/MurmurHash3.html#hash-long:A-int-int-long-">hash</a></span>​(long[] key, |
| int offsetLongs, |
| int lengthLongs, |
| long seed)</code></th> |
| <td class="colLast"> |
| <div class="block">Hash a portion of the given long[] array.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static long[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/hash/MurmurHash3.html#hash-long:A-long-">hash</a></span>​(long[] key, |
| long seed)</code></th> |
| <td class="colLast"> |
| <div class="block">Hash the given long[] array.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static long[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/hash/MurmurHash3.html#hash-long-long-">hash</a></span>​(long key, |
| long seed)</code></th> |
| <td class="colLast"> |
| <div class="block">Hash the given long.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static long[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/hash/MurmurHash3.html#hash-java.nio.ByteBuffer-long-">hash</a></span>​(<a href="https://docs.oracle.com/javase/9/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf, |
| long seed)</code></th> |
| <td class="colLast"> |
| <div class="block">Hash the remaining bytes of the given ByteBuffer starting at position().</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static long[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/hash/MurmurHash3.html#hash-org.apache.datasketches.memory.Memory-long-">hash</a></span>​(org.apache.datasketches.memory.Memory mem, |
| long seed)</code></th> |
| <td class="colLast"> |
| <div class="block">Hash the given Memory.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/9/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="hash-long-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hash</h4> |
| <pre>public static long[] hash​(long key, |
| long seed)</pre> |
| <div class="block">Hash the given long.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - The input long.</dd> |
| <dd><code>seed</code> - A long valued seed.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a 128-bit hash of the input as a long array of size 2.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hash-long:A-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hash</h4> |
| <pre>public static long[] hash​(long[] key, |
| long seed)</pre> |
| <div class="block">Hash the given long[] array.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - The input long[] array. It must be non-null and non-empty.</dd> |
| <dd><code>seed</code> - A long valued seed.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a 128-bit hash of the input as a long array of size 2.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hash-long:A-int-int-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hash</h4> |
| <pre>public static long[] hash​(long[] key, |
| int offsetLongs, |
| int lengthLongs, |
| long seed)</pre> |
| <div class="block">Hash a portion of the given long[] array.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - The input long[] array. It must be non-null and non-empty.</dd> |
| <dd><code>offsetLongs</code> - the starting offset in longs.</dd> |
| <dd><code>lengthLongs</code> - the length in longs of the portion of the array to be hashed.</dd> |
| <dd><code>seed</code> - A long valued seed.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a 128-bit hash of the input as a long array of size 2</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hash-int:A-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hash</h4> |
| <pre>public static long[] hash​(int[] key, |
| long seed)</pre> |
| <div class="block">Hash the given int[] array.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - The input int[] array. It must be non-null and non-empty.</dd> |
| <dd><code>seed</code> - A long valued seed.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a 128-bit hash of the input as a long array of size 2.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hash-int:A-int-int-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hash</h4> |
| <pre>public static long[] hash​(int[] key, |
| int offsetInts, |
| int lengthInts, |
| long seed)</pre> |
| <div class="block">Hash a portion of the given int[] array.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - The input int[] array. It must be non-null and non-empty.</dd> |
| <dd><code>offsetInts</code> - the starting offset in ints.</dd> |
| <dd><code>lengthInts</code> - the length in ints of the portion of the array to be hashed.</dd> |
| <dd><code>seed</code> - A long valued seed.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a 128-bit hash of the input as a long array of size 2.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hash-char:A-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hash</h4> |
| <pre>public static long[] hash​(char[] key, |
| long seed)</pre> |
| <div class="block">Hash the given char[] array.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - The input char[] array. It must be non-null and non-empty.</dd> |
| <dd><code>seed</code> - A long valued seed.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a 128-bit hash of the input as a long array of size 2</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hash-char:A-int-int-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hash</h4> |
| <pre>public static long[] hash​(char[] key, |
| int offsetChars, |
| int lengthChars, |
| long seed)</pre> |
| <div class="block">Hash a portion of the given char[] array.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - The input char[] array. It must be non-null and non-empty.</dd> |
| <dd><code>offsetChars</code> - the starting offset in chars.</dd> |
| <dd><code>lengthChars</code> - the length in chars of the portion of the array to be hashed.</dd> |
| <dd><code>seed</code> - A long valued seed.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a 128-bit hash of the input as a long array of size 2</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hash-byte:A-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hash</h4> |
| <pre>public static long[] hash​(byte[] key, |
| long seed)</pre> |
| <div class="block">Hash the given byte[] array.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - The input byte[] array. It must be non-null and non-empty.</dd> |
| <dd><code>seed</code> - A long valued seed.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a 128-bit hash of the input as a long array of size 2.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hash-byte:A-int-int-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hash</h4> |
| <pre>public static long[] hash​(byte[] key, |
| int offsetBytes, |
| int lengthBytes, |
| long seed)</pre> |
| <div class="block">Hash a portion of the given byte[] array.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>key</code> - The input byte[] array. It must be non-null and non-empty.</dd> |
| <dd><code>offsetBytes</code> - the starting offset in bytes.</dd> |
| <dd><code>lengthBytes</code> - the length in bytes of the portion of the array to be hashed.</dd> |
| <dd><code>seed</code> - A long valued seed.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a 128-bit hash of the input as a long array of size 2.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hash-java.nio.ByteBuffer-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hash</h4> |
| <pre>public static long[] hash​(<a href="https://docs.oracle.com/javase/9/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a> buf, |
| long seed)</pre> |
| <div class="block">Hash the remaining bytes of the given ByteBuffer starting at position().</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>buf</code> - The input ByteBuffer. It must be non-null and non-empty.</dd> |
| <dd><code>seed</code> - A long valued seed.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a 128-bit hash of the input as a long array of size 2.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hash-org.apache.datasketches.memory.Memory-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>hash</h4> |
| <pre>public static long[] hash​(org.apache.datasketches.memory.Memory mem, |
| long seed)</pre> |
| <div class="block">Hash the given Memory. |
| |
| <p>Note: if you want to hash only a portion of Memory, convert it to the |
| appropriate Region first with ByteOrder = Little Endian. If it is not |
| Little Endian a new region view will be created as Little Endian. |
| This does not change the underlying data.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>mem</code> - The input Memory. It must be non-null and non-empty.</dd> |
| <dd><code>seed</code> - A long valued seed.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a 128-bit hash of the input as a long array of size 2.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/MurmurHash3.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li>Prev Class</li> |
| <li><a href="../../../../org/apache/datasketches/hash/MurmurHash3Adaptor.html" title="class in org.apache.datasketches.hash"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/datasketches/hash/MurmurHash3.html" target="_top">Frames</a></li> |
| <li><a href="MurmurHash3.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2015–2021 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |