Documentation of 'jsat.utils.LongDoubleMap' Java class
LongDoubleMap
jsat.utils

Class LongDoubleMap

  • All Implemented Interfaces:
    java.util.Map<java.lang.Long,java.lang.Double>


    public final class LongDoubleMap
    extends java.util.AbstractMap<java.lang.Long,java.lang.Double>
    A hash map for storing the primitive types of long (as keys) to doubles (as table). The implementation is based on Algorithm D (Open addressing with double hashing) from Knuth's TAOCP page 528.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K,V>
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void clear() 
      boolean containsKey(long key) 
      boolean containsKey(java.lang.Object key) 
      java.util.Set<java.util.Map.Entry<java.lang.Long,java.lang.Double>> entrySet() 
      static int h(long key)
      Returns a non-negative hash value
      double increment(long key, double delta) 
      double put(long key, double value) 
      java.lang.Double put(java.lang.Long key, java.lang.Double value) 
      double remove(long key) 
      java.lang.Double remove(java.lang.Object key) 
      int size() 
      • Methods inherited from class java.util.AbstractMap

        containsValue, equals, get, hashCode, isEmpty, keySet, putAll, toString, values
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
    • Constructor Detail

      • LongDoubleMap

        public LongDoubleMap()
      • LongDoubleMap

        public LongDoubleMap(int capacity)
      • LongDoubleMap

        public LongDoubleMap(int capacity,
                             float loadFactor)
    • Method Detail

      • size

        public int size()
        Specified by:
        size in interface java.util.Map<java.lang.Long,java.lang.Double>
        Overrides:
        size in class java.util.AbstractMap<java.lang.Long,java.lang.Double>
      • put

        public java.lang.Double put(java.lang.Long key,
                                    java.lang.Double value)
        Specified by:
        put in interface java.util.Map<java.lang.Long,java.lang.Double>
        Overrides:
        put in class java.util.AbstractMap<java.lang.Long,java.lang.Double>
      • put

        public double put(long key,
                          double value)
      • increment

        public double increment(long key,
                                double delta)
        Parameters:
        key -
        delta -
        Returns:
        the new value stored for the given key
      • remove

        public java.lang.Double remove(java.lang.Object key)
        Specified by:
        remove in interface java.util.Map<java.lang.Long,java.lang.Double>
        Overrides:
        remove in class java.util.AbstractMap<java.lang.Long,java.lang.Double>
      • remove

        public double remove(long key)
        Parameters:
        key -
        Returns:
        the old value stored for this key, or Double.NaN if the key was not present in the map
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Map<java.lang.Long,java.lang.Double>
        Overrides:
        clear in class java.util.AbstractMap<java.lang.Long,java.lang.Double>
      • containsKey

        public boolean containsKey(java.lang.Object key)
        Specified by:
        containsKey in interface java.util.Map<java.lang.Long,java.lang.Double>
        Overrides:
        containsKey in class java.util.AbstractMap<java.lang.Long,java.lang.Double>
      • containsKey

        public boolean containsKey(long key)
      • h

        public static int h(long key)
        Returns a non-negative hash value
        Parameters:
        key -
        Returns:
      • entrySet

        public java.util.Set<java.util.Map.Entry<java.lang.Long,java.lang.Double>> entrySet()
        Specified by:
        entrySet in interface java.util.Map<java.lang.Long,java.lang.Double>
        Specified by:
        entrySet in class java.util.AbstractMap<java.lang.Long,java.lang.Double>

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.