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

Class IntDoubleMapArray

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


    public class IntDoubleMapArray
    extends java.util.AbstractMap<java.lang.Integer,java.lang.Double>
    Provides a map from integers to doubles backed by index into an array. Double.NaN may not be inserted and negative numbers may not be used for the key. This is meant as a convenience class, and should be used sparingly.
    • 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 Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void clear() 
      boolean containsKey(int key) 
      boolean containsKey(java.lang.Object key) 
      java.util.Set<java.util.Map.Entry<java.lang.Integer,java.lang.Double>> entrySet() 
      double get(int key)
      Returns the value to which the specified key is mapped, or Double.NaN if this map contains no mapping for the key.
      java.lang.Double get(java.lang.Object key) 
      double increment(int key, double delta) 
      double put(int key, double value) 
      java.lang.Double put(java.lang.Integer key, java.lang.Double value) 
      double remove(int key) 
      java.lang.Double remove(java.lang.Object key) 
      • Methods inherited from class java.util.AbstractMap

        containsValue, equals, hashCode, isEmpty, keySet, putAll, size, 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

      • IntDoubleMapArray

        public IntDoubleMapArray()
      • IntDoubleMapArray

        public IntDoubleMapArray(int max_index)
    • Method Detail

      • put

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

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

        public double increment(int key,
                                double delta)
        Parameters:
        key - the key whose associated value is to be incremented. All non-present keys behave as having an implicit value of zero, in which case the delta value is directly inserted into the map.
        delta - the amount by which to increment the key's stored value.
        Returns:
        the new value stored for the given key
      • get

        public double get(int key)
        Returns the value to which the specified key is mapped, or Double.NaN if this map contains no mapping for the key.
        Parameters:
        key - the key whose associated value is to be returned
        Returns:
        the value to which the specified key is mapped, or Double.NaN if this map contains no mapping for the key
      • get

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

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

        public double remove(int 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.Integer,java.lang.Double>
        Overrides:
        clear in class java.util.AbstractMap<java.lang.Integer,java.lang.Double>
      • containsKey

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

        public boolean containsKey(int key)
      • entrySet

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

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.