Interface Estimator

All Known Implementing Classes:
RaBitEstimator

public interface Estimator
Interface of an estimator used for calculating the distance between vectors.

Implementations of this interface are expected to provide a specific distance metric calculation, often used in search or similarity contexts where one vector (the query) is compared against many stored vectors.

  • Method Details

    • distance

      default double distance(@Nonnull Transformed<? extends RealVector> query, @Nonnull Transformed<? extends RealVector> storedVector)
    • distance

      double distance(@Nonnull RealVector query, @Nonnull RealVector storedVector)
      Calculates the distance between a pre-rotated and translated query vector and a stored vector.

      This method is designed to compute the distance metric between two vectors in a high-dimensional space. It is crucial that the query vector has already been appropriately transformed (e.g., rotated and translated) to align with the coordinate system of the storedVector before calling this method.

      Parameters:
      query - the pre-rotated and translated query vector, cannot be null.
      storedVector - the stored vector to which the distance is calculated, cannot be null.
      Returns:
      a non-negative double representing the distance between the two vectors.