org.apache.lucene.codecs

## Class CompetitiveImpactAccumulator

- java.lang.Object
- - org.apache.lucene.codecs.CompetitiveImpactAccumulator

-     public final class CompetitiveImpactAccumulator
      extends Object

  This class accumulates the (freq, norm) pairs that may produce competitive scores.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompetitiveImpactAccumulator()` Sole constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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.
    `void` | `addAll(CompetitiveImpactAccumulator acc)` Merge `acc` into this.
    `void` | `clear()` Reset to the same state it was in after creation.
    `SortedSet<Impact>` | `getCompetitiveFreqNormPairs()` Get the set of competitive freq and norm pairs, orderer by increasing freq and norm.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 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.

    - #### addAll

          public void addAll(CompetitiveImpactAccumulator acc)

      Merge `acc` into this.

    - #### getCompetitiveFreqNormPairs

          public SortedSet<Impact> getCompetitiveFreqNormPairs()

      Get the set of competitive freq and norm pairs, orderer by increasing freq and norm.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.