Save This Page
Home » mahout-collections-1.0-src » » [javadoc | source]
class: QuickOpenIntIntHashMap [javadoc | source]
Status: Experimental; Do not use for production yet. Hash map holding (key,value) associations of type (int-->int); Automatically grows and shrinks as needed; Implemented using open addressing with double hashing. First see the package summary and javadoc tree view to get the broad picture. Implements open addressing with double hashing, using "Brent's variation". Brent's variation slows insertions a bit down (not much) but reduces probes (collisions) for successful searches, in particular for large load factors. (It does not improve unsuccessful searches.) See D. Knuth, Searching and Sorting, 3rd ed., p.533-545
 QuickOpenIntIntHashMap(int initialCapacity) 
 QuickOpenIntIntHashMap(int initialCapacity,
    double minLoadFactor,
    double maxLoadFactor) 
Method from Summary:
put,   rehash
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from Detail:
 public boolean put(int key,
    int value) 
    Associates the given key with the given value. Replaces any old (key,someOtherValue) association, if existing.
 protected  void rehash(int newCapacity) 
    Rehashes the contents of the receiver into a new table with a smaller or larger capacity. This method is called automatically when the number of keys in the receiver exceeds the high water mark or falls below the low water mark.