public final class CompetitiveImpactAccumulator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
dirty |
private java.util.TreeSet<Impact> |
freqNormPairs |
private int[] |
maxFreqs |
Constructor and Description |
---|
CompetitiveImpactAccumulator()
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
add(Impact newEntry) |
void |
add(int freq,
long norm)
Accumulate a (freq,norm) pair, updating this structure if there is no
equivalent or more competitive entry already.
|
void |
addAll(CompetitiveImpactAccumulator acc)
Merge
acc into this. |
void |
clear()
Reset to the same state it was in after creation.
|
java.util.SortedSet<Impact> |
getCompetitiveFreqNormPairs()
Get the set of competitive freq and norm pairs, orderer by increasing freq and norm.
|
java.lang.String |
toString() |
private final int[] maxFreqs
private boolean dirty
private final java.util.TreeSet<Impact> freqNormPairs
public CompetitiveImpactAccumulator()
public void clear()
public void add(int freq, long norm)
public void addAll(CompetitiveImpactAccumulator acc)
acc
into this.public java.util.SortedSet<Impact> getCompetitiveFreqNormPairs()
private void add(Impact newEntry)
public java.lang.String toString()
toString
in class java.lang.Object