Class RaBitEstimator

java.lang.Object
com.apple.foundationdb.rabitq.RaBitEstimator
All Implemented Interfaces:
Estimator

public class RaBitEstimator extends Object implements Estimator
  • Constructor Details

    • RaBitEstimator

      public RaBitEstimator(@Nonnull Metric metric, int numExBits)
  • Method Details

    • getMetric

      @Nonnull public Metric getMetric()
    • getNumExBits

      public int getNumExBits()
    • distance

      public double distance(@Nonnull RealVector query, @Nonnull RealVector storedVector)
      Description copied from interface: Estimator
      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.

      Specified by:
      distance in interface Estimator
      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.
    • estimateDistanceAndErrorBound

      @Nonnull public RaBitEstimator.Result estimateDistanceAndErrorBound(@Nonnull RealVector query, @Nonnull EncodedRealVector encodedVector)