Class DoubleCountHashMap
- java.lang.Object
-
- org.apache.sysds.runtime.compress.utils.DoubleCountHashMap
-
public class DoubleCountHashMap extends Object
-
-
Constructor Summary
Constructors Constructor Description DoubleCountHashMap(int init_capacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DCounts[]extractValues()intget(double key)Get the value on a key, if the key is not inside a NullPointerException is thrown.double[]getDictionary()doublegetMostFrequent()intgetOrDefault(double key, int def)int[]getUnorderedCountsAndReplaceWithUIDs()int[]getUnorderedCountsAndReplaceWithUIDsWithout0()intincrement(double key)intincrement(double key, int count)voidreplaceWithUIDs()voidreplaceWithUIDsNoZero()voidreset(int size)intsize()StringtoString()
-
-
-
Method Detail
-
size
public int size()
-
increment
public final int increment(double key)
-
increment
public final int increment(double key, int count)
-
get
public int get(double key)
Get the value on a key, if the key is not inside a NullPointerException is thrown.- Parameters:
key- the key to lookup- Returns:
- count on key
-
getOrDefault
public int getOrDefault(double key, int def)
-
extractValues
public DCounts[] extractValues()
-
replaceWithUIDs
public void replaceWithUIDs()
-
replaceWithUIDsNoZero
public void replaceWithUIDsNoZero()
-
getUnorderedCountsAndReplaceWithUIDs
public int[] getUnorderedCountsAndReplaceWithUIDs()
-
getUnorderedCountsAndReplaceWithUIDsWithout0
public int[] getUnorderedCountsAndReplaceWithUIDsWithout0()
-
getMostFrequent
public double getMostFrequent()
-
getDictionary
public double[] getDictionary()
-
reset
public void reset(int size)
-
-