Package org.apache.sysds.runtime.compress.utils

## 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
`ACountHashMap()`
`ACountHashMap​(int arrSize)`

### Method Summary

All Methods Instance Methods Concrete Methods
`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()`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### ACountHashMap

    public ACountHashMap()

#### ACountHashMap

    public ACountHashMap​(int arrSize)

### 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 increment
  `count` - 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)

#### getC

    public ACount<T> getC​(T key)

#### getOrDefault

    public int getOrDefault​(T key,
                            int def)

#### extractValues

    public final ACount<T>[] extractValues()

#### getMostFrequent

    public T getMostFrequent()

#### sortBuckets

    public void sortBuckets()

#### reset

    public void reset​(int size)

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`