Class CompetitiveImpactAccumulator


  • public final class CompetitiveImpactAccumulator
    extends java.lang.Object
    This class accumulates the (freq, norm) pairs that may produce competitive scores.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int freq, long norm)
      Accumulate a (freq,norm) pair, updating this structure if there is no equivalent or more competitive entry already.
      private void add​(Impact newEntry, java.util.TreeSet<Impact> freqNormPairs)  
      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()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • maxFreqs

        private final int[] maxFreqs
      • otherFreqNormPairs

        private final java.util.TreeSet<Impact> otherFreqNormPairs
    • Constructor Detail

      • CompetitiveImpactAccumulator

        public CompetitiveImpactAccumulator()
        Sole constructor.
    • Method Detail

      • 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.
      • getCompetitiveFreqNormPairs

        public java.util.Collection<Impact> getCompetitiveFreqNormPairs()
        Get the set of competitive freq and norm pairs, ordered by increasing freq and norm.
      • add

        private void add​(Impact newEntry,
                         java.util.TreeSet<Impact> freqNormPairs)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • assertConsistent

        private boolean assertConsistent()