public final class CompetitiveImpactAccumulator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int[] |
maxFreqs |
private java.util.TreeSet<Impact> |
otherFreqNormPairs |
Constructor and Description |
---|
CompetitiveImpactAccumulator()
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
add(Impact newEntry,
java.util.TreeSet<Impact> freqNormPairs) |
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. |
private boolean |
assertConsistent() |
void |
clear()
Reset to the same state it was in after creation.
|
java.util.Collection<Impact> |
getCompetitiveFreqNormPairs()
Get the set of competitive freq and norm pairs, ordered by increasing freq and norm.
|
java.lang.String |
toString() |
private final int[] maxFreqs
private final java.util.TreeSet<Impact> otherFreqNormPairs
public CompetitiveImpactAccumulator()
public void clear()
public void add(int freq, long norm)
public void addAll(CompetitiveImpactAccumulator acc)
acc
into this.public java.util.Collection<Impact> getCompetitiveFreqNormPairs()
public java.lang.String toString()
toString
in class java.lang.Object
private boolean assertConsistent()