mirror of
https://github.com/apache/lucene.git
synced 2025-02-10 20:15:18 +00:00
CompetitiveImpactAccumulator should protect its costly invariant checks behind an assert
.
This commit is contained in:
parent
155b099caa
commit
b6a7f29b54
@ -63,7 +63,7 @@ public final class CompetitiveImpactAccumulator {
|
||||
public void clear() {
|
||||
Arrays.fill(maxFreqs, 0);
|
||||
otherFreqNormPairs.clear();
|
||||
assertConsistent();
|
||||
assert assertConsistent();
|
||||
}
|
||||
|
||||
/** Accumulate a (freq,norm) pair, updating this structure if there is no
|
||||
@ -75,7 +75,7 @@ public final class CompetitiveImpactAccumulator {
|
||||
} else {
|
||||
add(new Impact(freq, norm), otherFreqNormPairs);
|
||||
}
|
||||
assertConsistent();
|
||||
assert assertConsistent();
|
||||
}
|
||||
|
||||
/** Merge {@code acc} into this. */
|
||||
@ -90,7 +90,7 @@ public final class CompetitiveImpactAccumulator {
|
||||
add(entry, otherFreqNormPairs);
|
||||
}
|
||||
|
||||
assertConsistent();
|
||||
assert assertConsistent();
|
||||
}
|
||||
|
||||
/** Get the set of competitive freq and norm pairs, ordered by increasing freq and norm. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user