public class CounterMap<F,S> extends Object implements Serializable
Constructor and Description |
---|
CounterMap() |
Modifier and Type | Method and Description |
---|---|
Pair<F,S> |
argMax()
This method returns pair of elements with a max value
|
void |
clear()
This method purges all counters
|
void |
clear(F element)
This method purges counter for a given first element
|
double |
getCount(F first,
S second)
This method returns counts for a given first/second pair
|
Counter<S> |
getCounter(F first)
This method returns counter for a given first element
|
Iterator<Pair<F,S>> |
getIterator()
This method returns Iterator of all first/second pairs stored in this counter
|
void |
incrementAll(CounterMap<F,S> other)
This method will increment values of this counter, by counts of other counter
|
void |
incrementCount(F first,
S second,
double inc)
This method will increment counts for a given first/second pair
|
boolean |
isEmpty()
This method checks if this CounterMap has any values stored
|
boolean |
isEmpty(F element)
This method checks if this CounterMap has any values stored for a given first element
|
Set<F> |
keySet()
This method returns Set of all first elements
|
double |
setCount(F first,
S second,
double value)
This method allows you to set counter value for a given first/second pair
|
int |
size()
This method returns number of First elements in this CounterMap
|
int |
totalSize()
This method returns total number of elements in this CounterMap
|
public boolean isEmpty()
public boolean isEmpty(F element)
element
- public void incrementAll(CounterMap<F,S> other)
other
- public void incrementCount(F first, S second, double inc)
first
- second
- inc
- public double getCount(F first, S second)
first
- second
- public double setCount(F first, S second, double value)
first
- second
- value
- public void clear()
public void clear(F element)
element
- public Counter<S> getCounter(F first)
first
- public Iterator<Pair<F,S>> getIterator()
public int size()
public int totalSize()
Copyright © 2020. All rights reserved.