| <!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 (1.8.0_121) on Fri Apr 14 22:10:59 PDT 2017 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>org.apache.mahout.math.map (Mahout Math 0.13.0 API)</title> |
| <meta name="date" content="2017-04-14"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="org.apache.mahout.math.map (Mahout Math 0.13.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= 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 class="navBarCell1Rev">Package</li> |
| <li>Class</li> |
| <li><a href="package-use.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><a href="../../../../../org/apache/mahout/math/list/package-summary.html">Prev Package</a></li> |
| <li><a href="../../../../../org/apache/mahout/math/random/package-summary.html">Next Package</a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/mahout/math/map/package-summary.html" target="_top">Frames</a></li> |
| <li><a href="package-summary.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> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <div class="header"> |
| <h1 title="Package" class="title">Package org.apache.mahout.math.map</h1> |
| <div class="docSummary"> |
| <div class="block"><HTML> |
| <BODY> |
| Automatically growing and shrinking maps holding objects or primitive |
| data types such as <tt>int</tt>, <tt>double</tt>, etc.</div> |
| </div> |
| <p>See: <a href="#package.description">Description</a></p> |
| </div> |
| <div class="contentContainer"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> |
| <caption><span>Class Summary</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Class</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tbody> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractByteByteMap.html" title="class in org.apache.mahout.math.map">AbstractByteByteMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractByteCharMap.html" title="class in org.apache.mahout.math.map">AbstractByteCharMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractByteDoubleMap.html" title="class in org.apache.mahout.math.map">AbstractByteDoubleMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractByteFloatMap.html" title="class in org.apache.mahout.math.map">AbstractByteFloatMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractByteIntMap.html" title="class in org.apache.mahout.math.map">AbstractByteIntMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractByteLongMap.html" title="class in org.apache.mahout.math.map">AbstractByteLongMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractByteObjectMap.html" title="class in org.apache.mahout.math.map">AbstractByteObjectMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractByteShortMap.html" title="class in org.apache.mahout.math.map">AbstractByteShortMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractCharByteMap.html" title="class in org.apache.mahout.math.map">AbstractCharByteMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractCharCharMap.html" title="class in org.apache.mahout.math.map">AbstractCharCharMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractCharDoubleMap.html" title="class in org.apache.mahout.math.map">AbstractCharDoubleMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractCharFloatMap.html" title="class in org.apache.mahout.math.map">AbstractCharFloatMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractCharIntMap.html" title="class in org.apache.mahout.math.map">AbstractCharIntMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractCharLongMap.html" title="class in org.apache.mahout.math.map">AbstractCharLongMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractCharObjectMap.html" title="class in org.apache.mahout.math.map">AbstractCharObjectMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractCharShortMap.html" title="class in org.apache.mahout.math.map">AbstractCharShortMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractDoubleByteMap.html" title="class in org.apache.mahout.math.map">AbstractDoubleByteMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractDoubleCharMap.html" title="class in org.apache.mahout.math.map">AbstractDoubleCharMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractDoubleDoubleMap.html" title="class in org.apache.mahout.math.map">AbstractDoubleDoubleMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractDoubleFloatMap.html" title="class in org.apache.mahout.math.map">AbstractDoubleFloatMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractDoubleIntMap.html" title="class in org.apache.mahout.math.map">AbstractDoubleIntMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractDoubleLongMap.html" title="class in org.apache.mahout.math.map">AbstractDoubleLongMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractDoubleObjectMap.html" title="class in org.apache.mahout.math.map">AbstractDoubleObjectMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractDoubleShortMap.html" title="class in org.apache.mahout.math.map">AbstractDoubleShortMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractFloatByteMap.html" title="class in org.apache.mahout.math.map">AbstractFloatByteMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractFloatCharMap.html" title="class in org.apache.mahout.math.map">AbstractFloatCharMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractFloatDoubleMap.html" title="class in org.apache.mahout.math.map">AbstractFloatDoubleMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractFloatFloatMap.html" title="class in org.apache.mahout.math.map">AbstractFloatFloatMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractFloatIntMap.html" title="class in org.apache.mahout.math.map">AbstractFloatIntMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractFloatLongMap.html" title="class in org.apache.mahout.math.map">AbstractFloatLongMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractFloatObjectMap.html" title="class in org.apache.mahout.math.map">AbstractFloatObjectMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractFloatShortMap.html" title="class in org.apache.mahout.math.map">AbstractFloatShortMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractIntByteMap.html" title="class in org.apache.mahout.math.map">AbstractIntByteMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractIntCharMap.html" title="class in org.apache.mahout.math.map">AbstractIntCharMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractIntDoubleMap.html" title="class in org.apache.mahout.math.map">AbstractIntDoubleMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractIntFloatMap.html" title="class in org.apache.mahout.math.map">AbstractIntFloatMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractIntIntMap.html" title="class in org.apache.mahout.math.map">AbstractIntIntMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractIntLongMap.html" title="class in org.apache.mahout.math.map">AbstractIntLongMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractIntObjectMap.html" title="class in org.apache.mahout.math.map">AbstractIntObjectMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractIntShortMap.html" title="class in org.apache.mahout.math.map">AbstractIntShortMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractLongByteMap.html" title="class in org.apache.mahout.math.map">AbstractLongByteMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractLongCharMap.html" title="class in org.apache.mahout.math.map">AbstractLongCharMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractLongDoubleMap.html" title="class in org.apache.mahout.math.map">AbstractLongDoubleMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractLongFloatMap.html" title="class in org.apache.mahout.math.map">AbstractLongFloatMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractLongIntMap.html" title="class in org.apache.mahout.math.map">AbstractLongIntMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractLongLongMap.html" title="class in org.apache.mahout.math.map">AbstractLongLongMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractLongObjectMap.html" title="class in org.apache.mahout.math.map">AbstractLongObjectMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractLongShortMap.html" title="class in org.apache.mahout.math.map">AbstractLongShortMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractObjectByteMap.html" title="class in org.apache.mahout.math.map">AbstractObjectByteMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractObjectCharMap.html" title="class in org.apache.mahout.math.map">AbstractObjectCharMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractObjectDoubleMap.html" title="class in org.apache.mahout.math.map">AbstractObjectDoubleMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractObjectFloatMap.html" title="class in org.apache.mahout.math.map">AbstractObjectFloatMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractObjectIntMap.html" title="class in org.apache.mahout.math.map">AbstractObjectIntMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractObjectLongMap.html" title="class in org.apache.mahout.math.map">AbstractObjectLongMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractObjectShortMap.html" title="class in org.apache.mahout.math.map">AbstractObjectShortMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractShortByteMap.html" title="class in org.apache.mahout.math.map">AbstractShortByteMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractShortCharMap.html" title="class in org.apache.mahout.math.map">AbstractShortCharMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractShortDoubleMap.html" title="class in org.apache.mahout.math.map">AbstractShortDoubleMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractShortFloatMap.html" title="class in org.apache.mahout.math.map">AbstractShortFloatMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractShortIntMap.html" title="class in org.apache.mahout.math.map">AbstractShortIntMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractShortLongMap.html" title="class in org.apache.mahout.math.map">AbstractShortLongMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractShortObjectMap.html" title="class in org.apache.mahout.math.map">AbstractShortObjectMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/AbstractShortShortMap.html" title="class in org.apache.mahout.math.map">AbstractShortShortMap</a></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/HashFunctions.html" title="class in org.apache.mahout.math.map">HashFunctions</a></td> |
| <td class="colLast"> |
| <div class="block">Provides various hash functions.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenByteByteHashMap.html" title="class in org.apache.mahout.math.map">OpenByteByteHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from byte keys to byte values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenByteCharHashMap.html" title="class in org.apache.mahout.math.map">OpenByteCharHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from byte keys to char values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenByteDoubleHashMap.html" title="class in org.apache.mahout.math.map">OpenByteDoubleHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from byte keys to double values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenByteFloatHashMap.html" title="class in org.apache.mahout.math.map">OpenByteFloatHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from byte keys to float values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenByteIntHashMap.html" title="class in org.apache.mahout.math.map">OpenByteIntHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from byte keys to int values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenByteLongHashMap.html" title="class in org.apache.mahout.math.map">OpenByteLongHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from byte keys to long values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenByteObjectHashMap.html" title="class in org.apache.mahout.math.map">OpenByteObjectHashMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenByteShortHashMap.html" title="class in org.apache.mahout.math.map">OpenByteShortHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from byte keys to short values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenCharByteHashMap.html" title="class in org.apache.mahout.math.map">OpenCharByteHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from char keys to byte values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenCharCharHashMap.html" title="class in org.apache.mahout.math.map">OpenCharCharHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from char keys to char values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenCharDoubleHashMap.html" title="class in org.apache.mahout.math.map">OpenCharDoubleHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from char keys to double values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenCharFloatHashMap.html" title="class in org.apache.mahout.math.map">OpenCharFloatHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from char keys to float values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenCharIntHashMap.html" title="class in org.apache.mahout.math.map">OpenCharIntHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from char keys to int values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenCharLongHashMap.html" title="class in org.apache.mahout.math.map">OpenCharLongHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from char keys to long values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenCharObjectHashMap.html" title="class in org.apache.mahout.math.map">OpenCharObjectHashMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenCharShortHashMap.html" title="class in org.apache.mahout.math.map">OpenCharShortHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from char keys to short values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenDoubleByteHashMap.html" title="class in org.apache.mahout.math.map">OpenDoubleByteHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from double keys to byte values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenDoubleCharHashMap.html" title="class in org.apache.mahout.math.map">OpenDoubleCharHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from double keys to char values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenDoubleDoubleHashMap.html" title="class in org.apache.mahout.math.map">OpenDoubleDoubleHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from double keys to double values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenDoubleFloatHashMap.html" title="class in org.apache.mahout.math.map">OpenDoubleFloatHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from double keys to float values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenDoubleIntHashMap.html" title="class in org.apache.mahout.math.map">OpenDoubleIntHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from double keys to int values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenDoubleLongHashMap.html" title="class in org.apache.mahout.math.map">OpenDoubleLongHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from double keys to long values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenDoubleObjectHashMap.html" title="class in org.apache.mahout.math.map">OpenDoubleObjectHashMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenDoubleShortHashMap.html" title="class in org.apache.mahout.math.map">OpenDoubleShortHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from double keys to short values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenFloatByteHashMap.html" title="class in org.apache.mahout.math.map">OpenFloatByteHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from float keys to byte values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenFloatCharHashMap.html" title="class in org.apache.mahout.math.map">OpenFloatCharHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from float keys to char values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenFloatDoubleHashMap.html" title="class in org.apache.mahout.math.map">OpenFloatDoubleHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from float keys to double values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenFloatFloatHashMap.html" title="class in org.apache.mahout.math.map">OpenFloatFloatHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from float keys to float values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenFloatIntHashMap.html" title="class in org.apache.mahout.math.map">OpenFloatIntHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from float keys to int values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenFloatLongHashMap.html" title="class in org.apache.mahout.math.map">OpenFloatLongHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from float keys to long values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenFloatObjectHashMap.html" title="class in org.apache.mahout.math.map">OpenFloatObjectHashMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenFloatShortHashMap.html" title="class in org.apache.mahout.math.map">OpenFloatShortHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from float keys to short values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenHashMap.html" title="class in org.apache.mahout.math.map">OpenHashMap</a><K,V></td> |
| <td class="colLast"> |
| <div class="block">Open hash map.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenIntByteHashMap.html" title="class in org.apache.mahout.math.map">OpenIntByteHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from int keys to byte values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenIntCharHashMap.html" title="class in org.apache.mahout.math.map">OpenIntCharHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from int keys to char values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenIntDoubleHashMap.html" title="class in org.apache.mahout.math.map">OpenIntDoubleHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from int keys to double values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenIntFloatHashMap.html" title="class in org.apache.mahout.math.map">OpenIntFloatHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from int keys to float values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenIntIntHashMap.html" title="class in org.apache.mahout.math.map">OpenIntIntHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from int keys to int values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenIntLongHashMap.html" title="class in org.apache.mahout.math.map">OpenIntLongHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from int keys to long values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenIntObjectHashMap.html" title="class in org.apache.mahout.math.map">OpenIntObjectHashMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenIntShortHashMap.html" title="class in org.apache.mahout.math.map">OpenIntShortHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from int keys to short values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenLongByteHashMap.html" title="class in org.apache.mahout.math.map">OpenLongByteHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from long keys to byte values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenLongCharHashMap.html" title="class in org.apache.mahout.math.map">OpenLongCharHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from long keys to char values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenLongDoubleHashMap.html" title="class in org.apache.mahout.math.map">OpenLongDoubleHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from long keys to double values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenLongFloatHashMap.html" title="class in org.apache.mahout.math.map">OpenLongFloatHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from long keys to float values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenLongIntHashMap.html" title="class in org.apache.mahout.math.map">OpenLongIntHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from long keys to int values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenLongLongHashMap.html" title="class in org.apache.mahout.math.map">OpenLongLongHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from long keys to long values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenLongObjectHashMap.html" title="class in org.apache.mahout.math.map">OpenLongObjectHashMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenLongShortHashMap.html" title="class in org.apache.mahout.math.map">OpenLongShortHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from long keys to short values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenObjectByteHashMap.html" title="class in org.apache.mahout.math.map">OpenObjectByteHashMap</a><T></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from Object keys to byte values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenObjectCharHashMap.html" title="class in org.apache.mahout.math.map">OpenObjectCharHashMap</a><T></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from Object keys to char values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenObjectDoubleHashMap.html" title="class in org.apache.mahout.math.map">OpenObjectDoubleHashMap</a><T></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from Object keys to double values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenObjectFloatHashMap.html" title="class in org.apache.mahout.math.map">OpenObjectFloatHashMap</a><T></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from Object keys to float values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenObjectIntHashMap.html" title="class in org.apache.mahout.math.map">OpenObjectIntHashMap</a><T></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from Object keys to int values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenObjectLongHashMap.html" title="class in org.apache.mahout.math.map">OpenObjectLongHashMap</a><T></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from Object keys to long values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenObjectShortHashMap.html" title="class in org.apache.mahout.math.map">OpenObjectShortHashMap</a><T></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from Object keys to short values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenShortByteHashMap.html" title="class in org.apache.mahout.math.map">OpenShortByteHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from short keys to byte values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenShortCharHashMap.html" title="class in org.apache.mahout.math.map">OpenShortCharHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from short keys to char values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenShortDoubleHashMap.html" title="class in org.apache.mahout.math.map">OpenShortDoubleHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from short keys to double values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenShortFloatHashMap.html" title="class in org.apache.mahout.math.map">OpenShortFloatHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from short keys to float values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenShortIntHashMap.html" title="class in org.apache.mahout.math.map">OpenShortIntHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from short keys to int values.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenShortLongHashMap.html" title="class in org.apache.mahout.math.map">OpenShortLongHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from short keys to long values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenShortObjectHashMap.html" title="class in org.apache.mahout.math.map">OpenShortObjectHashMap</a><T></td> |
| <td class="colLast"> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/OpenShortShortHashMap.html" title="class in org.apache.mahout.math.map">OpenShortShortHashMap</a></td> |
| <td class="colLast"> |
| <div class="block">Open hash map from short keys to short values.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/mahout/math/map/PrimeFinder.html" title="class in org.apache.mahout.math.map">PrimeFinder</a></td> |
| <td class="colLast"> |
| <div class="block">Not of interest for users; only for implementors of hashtables.</div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </li> |
| </ul> |
| <a name="package.description"> |
| <!-- --> |
| </a> |
| <h2 title="Package org.apache.mahout.math.map Description">Package org.apache.mahout.math.map Description</h2> |
| <div class="block"><HTML> |
| <BODY> |
| Automatically growing and shrinking maps holding objects or primitive |
| data types such as <tt>int</tt>, <tt>double</tt>, etc. Currently all maps are |
| based upon hashing. |
| <h2><a name="Overview"></a>1. Overview</h2> |
| <p>The map package offers flexible object oriented abstractions modelling automatically |
| resizing maps. It is designed to be scalable in terms of performance and memory |
| requirements.</p> |
| <p>Features include: </p> |
| <p></p> |
| <ul> |
| <li>Maps operating on objects as well as all primitive data types such as <code>int</code>, |
| <code>double</code>, etc. |
| </li> |
| <li>Compact representations</li> |
| <li>Support for quick access to associations</li> |
| <li>A number of general purpose map operations</li> |
| </ul> |
| <p>File-based I/O can be achieved through the standard Java built-in serialization |
| mechanism. All classes implement the <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io"><code>Serializable</code></a> interface. |
| However, the toolkit is entirely decoupled from advanced I/O. It provides data |
| structures and algorithms only. |
| <p> This toolkit borrows some terminology from the Javasoft <a |
| href="http://www.javasoft.com/products/jdk/1.2/docs/guide/collections/index.html"> |
| Collections framework</a> written by Josh Bloch and introduced in JDK 1.2. |
| <h2>2. Introduction</h2> |
| <p>A map is an associative container that manages a set of (key,value) pairs. |
| It is useful for implementing a collection of one-to-one mappings. A (key,value) |
| pair is called an <i>association</i>. A value can be looked up up via its key. |
| Associations can quickly be set, removed and retrieved. They are stored in a |
| hashing structure based on the hash code of their keys, which is obtained by |
| using a hash function. </p> |
| <p> A map can, for example, contain <tt>Name-->Location</tt> associations like |
| <tt>{("Pete", "Geneva"), ("Steve", "Paris"), ("Robert", "New York")}</tt> used |
| in address books or <tt>Index-->Value</tt> mappings like <tt>{(0, 100), (3, |
| 1000), (100000, 70)}</tt> representing sparse lists or matrices. For example |
| this could mean at index 0 we have a value of 100, at index 3 we have a value |
| of 1000, at index 1000000 we have a value of 70, and at all other indexes we |
| have a value of, say, zero. Another example is a map of IP addresses to domain |
| names (DNS). Maps can also be useful to represent<i> multi sets</i>, that is, |
| sets where elements can occur more than once. For multi sets one would have |
| <tt>Value-->Frequency</tt> mappings like <tt>{(100, 1), (50, 1000), (101, 3))}</tt> |
| meaning element 100 occurs 1 time, element 50 occurs 1000 times, element 101 |
| occurs 3 times. Further, maps can also manage <tt>ObjectIdentifier-->Object</tt> |
| mappings like <tt>{(12, obj1), (7, obj2), (10000, obj3), (9, obj4)}</tt> used |
| in Object Databases. |
| <p> A map cannot contain two or more <i>equal</i> keys; a key can map to at most |
| one value. However, more than one key can map to identical values. For primitive |
| data types "equality" of keys is defined as identity (operator <tt>==</tt>). |
| For maps using <tt>Object</tt> keys, the meaning of "equality" can be specified |
| by the user upon instance construction. It can either be defined to be identity |
| (operator <tt>==</tt>) or to be given by the method <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang"><code>Object.equals(Object)</code></a>. |
| Associations of kind <tt>(AnyType,Object)</tt> can be of the form <tt>(AnyKey,null) |
| </tt>, i.e. values can be <tt>null</tt>. |
| <p> The classes of this package make no guarantees as to the order of the elements |
| returned by iterators; in particular, they do not guarantee that the order will |
| remain constant over time. |
| <h2></h2> |
| <h4>Copying</h4> |
| <p> |
| <p>Any map can be copied. A copy is <i>equal</i> to the original but entirely |
| independent of the original. So changes in the copy are not reflected in the |
| original, and vice-versa. |
| <h2>3. Package organization</h2> |
| <p>For most primitive data types and for objects there exists a separate map version. |
| All versions are just the same, except that they operate on different data types. |
| Colt includes two kinds of implementations for maps: The two different implementations |
| are tagged <b>Chained</b> and <b>Open</b>. |
| Note: Chained is no more included. Wherever it is mentioned it is of historic interest only.</p> |
| <ul> |
| <li><b>Chained</b> uses extendible separate chaining with chains holding unsorted |
| dynamically linked collision lists. |
| <li><b>Open</b> uses extendible open addressing with double hashing. |
| </ul> |
| <p>Class naming follows the schema <tt><Implementation><KeyType><ValueType>HashMap</tt>. |
| For example, a <a href="../../../../../org/apache/mahout/math/map/OpenIntDoubleHashMap.html" title="class in org.apache.mahout.math.map"><code>OpenIntDoubleHashMap</code></a> holds <tt>(int-->double)</tt> |
| associations and is implemented with open addressing. A <a href="../../../../../org/apache/mahout/math/map/OpenIntObjectHashMap.html" title="class in org.apache.mahout.math.map"><code>OpenIntObjectHashMap</code></a> |
| holds <tt>(int-->Object)</tt> associations and is implemented with open addressing. |
| </p> |
| <p>The classes for maps of a given (key,value) type are derived from a common |
| abstract base class tagged <tt>Abstract<KeyType><ValueType></tt><tt>Map</tt>. |
| For example, all maps operating on <tt>(int-->double)</tt> associations are |
| derived from <a href="../../../../../org/apache/mahout/math/map/AbstractIntDoubleMap.html" title="class in org.apache.mahout.math.map"><code>AbstractIntDoubleMap</code></a>, which in turn is derived |
| from an abstract base class tying together all maps regardless of assocation |
| type, <a href="../../../../../org/apache/mahout/math/set/AbstractSet.html" title="class in org.apache.mahout.math.set"><code>AbstractSet</code></a>. The abstract base classes provide skeleton |
| implementations for all but few methods. Experimental layouts (such as chaining, |
| open addressing, extensible hashing, red-black-trees, etc.) can easily be implemented |
| and inherit a rich set of functionality. Have a look at the javadoc <a href="package-tree.html">tree |
| view</a> to get the broad picture.</p> |
| <h2>4. Example usage</h2> |
| <TABLE> |
| <TD CLASS="PRE"> |
| <PRE> |
| int[] keys = {0 , 3 , 100000, 9 }; |
| double[] values = {100.0, 1000.0, 70.0 , 71.0}; |
| AbstractIntDoubleMap map = new OpenIntDoubleHashMap(); |
| // add several associations |
| for (int i=0; i < keys.length; i++) map.put(keys[i], values[i]); |
| log.info("map="+map); |
| log.info("size="+map.size()); |
| log.info(map.containsKey(3)); |
| log.info("get(3)="+map.get(3)); |
| log.info(map.containsKey(4)); |
| log.info("get(4)="+map.get(4)); |
| log.info(map.containsValue(71.0)); |
| log.info("keyOf(71.0)="+map.keyOf(71.0)); |
| // remove one association |
| map.removeKey(3); |
| log.info("\nmap="+map); |
| log.info(map.containsKey(3)); |
| log.info("get(3)="+map.get(3)); |
| log.info(map.containsValue(1000.0)); |
| log.info("keyOf(1000.0)="+map.keyOf(1000.0)); |
| // clear |
| map.clear(); |
| log.info("\nmap="+map); |
| log.info("size="+map.size()); |
| </PRE> |
| </TD> |
| </TABLE> |
| yields the following output |
| <TABLE> |
| <TD CLASS="PRE"> |
| <PRE> |
| map=[0->100.0, 3->1000.0, 9->71.0, 100000->70.0] |
| size=4 |
| true |
| get(3)=1000.0 |
| false |
| get(4)=0.0 |
| true |
| keyOf(71.0)=9 |
| map=[0->100.0, 9->71.0, 100000->70.0] |
| false |
| get(3)=0.0 |
| false |
| keyOf(1000.0)=-2147483648 |
| map=[] |
| size=0 |
| </PRE> |
| </TD> |
| </TABLE> |
| <h2> 5. Notes </h2> |
| <p> |
| Note that implementations are not synchronized. |
| <p> |
| Choosing efficient parameters for hash maps is not always easy. |
| However, since parameters determine efficiency and memory requirements, here is a quick guide how to choose them. |
| If your use case does not heavily operate on hash maps but uses them just because they provide |
| convenient functionality, you can safely skip this section. |
| For those of you who care, read on. |
| <p> |
| There are three parameters that can be customized upon map construction: <tt>initialCapacity</tt>, |
| <tt>minLoadFactor</tt> and <tt>maxLoadFactor</tt>. |
| The more memory one can afford, the faster a hash map. |
| The hash map's capacity is the maximum number of associations that can be added without needing to allocate new |
| internal memory. |
| A larger capacity means faster adding, searching and removing. |
| The <tt>initialCapacity</tt> corresponds to the capacity used upon instance construction. |
| <p> |
| The <tt>loadFactor</tt> of a hash map measures the degree of "fullness". |
| It is given by the number of assocations (<tt>size()</tt>) |
| divided by the hash map capacity <tt>(0.0 <= loadFactor <= 1.0)</tt>. |
| The more associations are added, the larger the loadFactor and the more hash map performance degrades. |
| Therefore, when the loadFactor exceeds a customizable threshold (<tt>maxLoadFactor</tt>), the hash map is |
| automatically grown. |
| In such a way performance degradation can be avoided. |
| Similarly, when the loadFactor falls below a customizable threshold (<tt>minLoadFactor</tt>), the hash map is |
| automatically shrinked. |
| In such a way excessive memory consumption can be avoided. |
| Automatic resizing (both growing and shrinking) obeys the following invariant: |
| <p> |
| <tt>capacity * minLoadFactor <= size() <= capacity * maxLoadFactor</tt> |
| <p> The term <tt>capacity * minLoadFactor</tt> is called the <i>low water mark</i>, |
| <tt>capacity * maxLoadFactor</tt> is called the <i>high water mark</i>. In other |
| words, the number of associations may vary within the water mark constraints. |
| When it goes out of range, the map is automatically resized and memory consumption |
| changes proportionally. |
| <ul> |
| <li>To tune for memory at the expense of performance, both increase <tt>minLoadFactor</tt> and |
| <tt>maxLoadFactor</tt>. |
| <li>To tune for performance at the expense of memory, both decrease <tt>minLoadFactor</tt> and |
| <tt>maxLoadFactor</tt>. |
| As as special case set <tt>minLoadFactor=0</tt> to avoid any automatic shrinking. |
| </ul> |
| Resizing large hash maps can be time consuming, <tt>O(size())</tt>, and should be avoided if possible (maintaining |
| primes is not the reason). |
| Unnecessary growing operations can be avoided if the number of associations is known before they are added, or can be |
| estimated.<p> |
| In such a case good parameters are as follows: |
| <p> |
| <i>For chaining:</i> |
| <br>Set the <tt>initialCapacity = 1.4*expectedSize</tt> or greater. |
| <br>Set the <tt>maxLoadFactor = 0.8</tt> or greater. |
| <p> |
| <i>For open addressing:</i> |
| <br>Set the <tt>initialCapacity = 2*expectedSize</tt> or greater. Alternatively call <tt>ensureCapacity(...)</tt>. |
| <br>Set the <tt>maxLoadFactor = 0.5</tt>. |
| <br>Never set <tt>maxLoadFactor > 0.55</tt>; open addressing exponentially slows down beyond that point. |
| <p> |
| In this way the hash map will never need to grow and still stay fast. |
| It is never a good idea to set <tt>maxLoadFactor < 0.1</tt>, |
| because the hash map would grow too often. |
| If it is entirelly unknown how many associations the application will use, |
| the default constructor should be used. The map will grow and shrink as needed. |
| <p> |
| <b>Comparision of chaining and open addressing</b> |
| <p> Chaining is faster than open addressing, when assuming unconstrained memory |
| consumption. Open addressing is more space efficient than chaining, because |
| it does not create entry objects but uses primitive arrays which are considerably |
| smaller. Entry objects consume significant amounts of memory compared to the |
| information they actually hold. Open addressing also poses no problems to the |
| garbage collector. In contrast, chaining can create millions of entry objects |
| which are linked; a nightmare for any garbage collector. In addition, entry |
| object creation is a bit slow. <br> |
| Therefore, with the same amount of memory, or even less memory, hash maps with |
| larger capacity can be maintained under open addressing, which yields smaller |
| loadFactors, which in turn keeps performance competitive with chaining. In our |
| benchmarks, using significantly less memory, open addressing usually is not |
| more than 1.2-1.5 times slower than chaining. |
| <p><b>Further readings</b>: |
| <br>Knuth D., The Art of Computer Programming: Searching and Sorting, 3rd ed. |
| <br>Griswold W., Townsend G., The Design and Implementation of Dynamic Hashing for Sets and Tables in Icon, |
| Software - Practice and Experience, Vol. 23(4), 351-367 (April 1993). |
| <br>Larson P., Dynamic hash tables, Comm. of the ACM, 31, (4), 1988. |
| <p> |
| <b>Performance:</b> |
| <p> |
| Time complexity: |
| <br>The classes offer <i>expected</i> time complexity <tt>O(1)</tt> (i.e. constant time) for the basic operations |
| <tt>put</tt>, <tt>get</tt>, <tt>removeKey</tt>, <tt>containsKey</tt> and <tt>size</tt>, |
| assuming the hash function disperses the elements properly among the buckets. |
| Otherwise, pathological cases, although highly improbable, can occur, degrading performance to <tt>O(N)</tt> in the |
| worst case. |
| Operations <tt>containsValue</tt> and <tt>keyOf</tt> are <tt>O(N)</tt>. |
| <p> |
| Memory requirements for <i>open addressing</i>: |
| <br>worst case: <tt>memory [bytes] = (1/minLoadFactor) * size() * (1 + sizeOf(key) + sizeOf(value))</tt>. |
| <br>best case: <tt>memory [bytes] = (1/maxLoadFactor) * size() * (1 + sizeOf(key) + sizeOf(value))</tt>. |
| Where <tt>sizeOf(int) = 4</tt>, <tt>sizeOf(double) = 8</tt>, <tt>sizeOf(Object) = 4</tt>, etc. |
| Thus, an <tt>OpenIntIntHashMap</tt> with minLoadFactor=0.25 and maxLoadFactor=0.5 and 1000000 associations uses |
| between 17 MB and 34 MB. |
| The same map with 1000 associations uses between 17 and 34 KB. |
| <p> |
| </BODY> |
| </HTML></div> |
| </div> |
| <!-- ======= 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 class="navBarCell1Rev">Package</li> |
| <li>Class</li> |
| <li><a href="package-use.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><a href="../../../../../org/apache/mahout/math/list/package-summary.html">Prev Package</a></li> |
| <li><a href="../../../../../org/apache/mahout/math/random/package-summary.html">Next Package</a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/mahout/math/map/package-summary.html" target="_top">Frames</a></li> |
| <li><a href="package-summary.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> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2008–2017 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |