Interface NeighborSimilarity.ScoreFunction

All Known Subinterfaces:
NeighborSimilarity.ApproximateScoreFunction, NeighborSimilarity.ExactScoreFunction
Enclosing interface:
NeighborSimilarity

public static interface NeighborSimilarity.ScoreFunction
Provides an API for encapsulating similarity to another node or vector. Used both for building the graph (as part of NeighborSimilarity) or for searching it (used standalone, with a reference to the query vector).

ExactScoreFunction and ApproximateScoreFunction are provided for convenience so they can be defined as a simple lambda.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    float
    similarityTo(int node2)
     
  • Method Details

    • isExact

      boolean isExact()
    • similarityTo

      float similarityTo(int node2)