Interface Similarity.BulkSimScorer

Enclosing class:
Similarity

public static interface Similarity.BulkSimScorer
Specialization of Similarity.SimScorer for bulk-computation of scores.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    score(int size, float[] freqs, long[] norms, float[] scores)
    Bulk computation of scores.
  • Method Details

    • score

      void score(int size, float[] freqs, long[] norms, float[] scores)
      Bulk computation of scores. For each index i in [0, size), scores[i] is computed as score(freqs[i], norms[i]). The default implementation does the following:
       for (int i = 0; i < size; ++i) {
         scores[i] = score(freqs[i], norms[i]);
       }
       

      NOTE: It is legal to pass the same freqs and scores arrays.