Class ACountHashMap<T>
- java.lang.Object
-
- org.apache.sysds.runtime.compress.utils.ACountHashMap<T>
-
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
DblArrayCountHashMap
,DoubleCountHashMap
public abstract class ACountHashMap<T> extends Object implements Cloneable
-
-
Constructor Summary
Constructors Constructor Description ACountHashMap()
ACountHashMap(int arrSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ACount<T>[]
extractValues()
int
get(T key)
ACount<T>
getC(T key)
int
getId(T key)
T
getMostFrequent()
int
getOrDefault(T key, int def)
int
increment(double key)
int
increment(double key, int count)
int
increment(T key)
Increment and return the id of the incremeted index.int
increment(T key, int count)
Increment and return the id of the incremented index.void
reset(int size)
int
size()
void
sortBuckets()
String
toString()
-
-
-
Method Detail
-
size
public int size()
-
increment
public final int increment(T key)
Increment and return the id of the incremeted index.- Parameters:
key
- The key to increment- Returns:
- The id of the incremented entry.
-
increment
public final int increment(double key)
-
increment
public int increment(T key, int count)
Increment and return the id of the incremented index.- Parameters:
key
- The key to incrementcount
- The number of times to increment the value- Returns:
- The Id of the incremented entry.
-
increment
public final int increment(double key, int count)
-
get
public int get(T key)
-
getId
public int getId(T key)
-
getOrDefault
public int getOrDefault(T key, int def)
-
getMostFrequent
public T getMostFrequent()
-
sortBuckets
public void sortBuckets()
-
reset
public void reset(int size)
-
-