java.lang.Object
org.apache.lucene.codecs.CompetitiveImpactAccumulator
This class accumulates the (freq, norm) pairs that may produce competitive scores.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int freq, long norm) Accumulate a (freq,norm) pair, updating this structure if there is no equivalent or more competitive entry already.private voidvoidMergeaccinto this.private booleanvoidclear()Reset to the same state it was in after creation.voidReplace the content of thisaccwith the providedacc.Get the set of competitive freq and norm pairs, ordered by increasing freq and norm.toString()
-
Field Details
-
maxFreqs
private final int[] maxFreqs -
otherFreqNormPairs
-
-
Constructor Details
-
CompetitiveImpactAccumulator
public CompetitiveImpactAccumulator()Sole constructor.
-
-
Method Details
-
clear
public void clear()Reset to the same state it was in after creation. -
add
public void add(int freq, long norm) Accumulate a (freq,norm) pair, updating this structure if there is no equivalent or more competitive entry already. -
addAll
Mergeaccinto this. -
copy
Replace the content of thisaccwith the providedacc. -
getCompetitiveFreqNormPairs
Get the set of competitive freq and norm pairs, ordered by increasing freq and norm. -
add
-
toString
-
assertConsistent
private boolean assertConsistent()
-