Interface ESVectorUtilSupport


public interface ESVectorUtilSupport
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final short
    The number of bits in bit-quantized query vectors
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    calculateOSQGridPoints(float[] target, int[] quantize, int points, float[] pts)
     
    float
    calculateOSQLoss(float[] target, float lowerInterval, float upperInterval, float step, float invStep, float norm2, float lambda, int[] quantize)
     
    void
    centerAndCalculateOSQStatsDp(float[] target, float[] centroid, float[] centered, float[] stats)
     
    void
    centerAndCalculateOSQStatsEuclidean(float[] target, float[] centroid, float[] centered, float[] stats)
     
    long
    ipByteBinByte(byte[] q, byte[] d)
    Compute dot product between q and d
    int
    ipByteBit(byte[] q, byte[] d)
     
    float
    ipFloatBit(float[] q, byte[] d)
     
    float
    ipFloatByte(float[] q, byte[] d)
     
    void
    packAsBinary(int[] vector, byte[] packed)
     
    int
    quantizeVectorWithIntervals(float[] vector, int[] quantize, float lowInterval, float upperInterval, byte bit)
     
    float
    soarDistance(float[] v1, float[] centroid, float[] originalResidual, float soarLambda, float rnorm)
     
    void
    soarDistanceBulk(float[] v1, float[] c0, float[] c1, float[] c2, float[] c3, float[] originalResidual, float soarLambda, float rnorm, float[] distances)
     
    void
    squareDistanceBulk(float[] query, float[] v0, float[] v1, float[] v2, float[] v3, float[] distances)
     
    void
    transposeHalfByte(int[] q, byte[] quantQueryByte)
     
  • Field Details

    • B_QUERY

      static final short B_QUERY
      The number of bits in bit-quantized query vectors
      See Also:
  • Method Details

    • ipByteBinByte

      long ipByteBinByte(byte[] q, byte[] d)
      Compute dot product between q and d
      Parameters:
      q - query vector, B_QUERY-bit quantized and striped (see BQSpaceUtils.transposeHalfByte)
      d - data vector, 1-bit quantized
    • ipByteBit

      int ipByteBit(byte[] q, byte[] d)
    • ipFloatBit

      float ipFloatBit(float[] q, byte[] d)
    • ipFloatByte

      float ipFloatByte(float[] q, byte[] d)
    • calculateOSQLoss

      float calculateOSQLoss(float[] target, float lowerInterval, float upperInterval, float step, float invStep, float norm2, float lambda, int[] quantize)
    • calculateOSQGridPoints

      void calculateOSQGridPoints(float[] target, int[] quantize, int points, float[] pts)
    • centerAndCalculateOSQStatsEuclidean

      void centerAndCalculateOSQStatsEuclidean(float[] target, float[] centroid, float[] centered, float[] stats)
    • centerAndCalculateOSQStatsDp

      void centerAndCalculateOSQStatsDp(float[] target, float[] centroid, float[] centered, float[] stats)
    • soarDistance

      float soarDistance(float[] v1, float[] centroid, float[] originalResidual, float soarLambda, float rnorm)
    • quantizeVectorWithIntervals

      int quantizeVectorWithIntervals(float[] vector, int[] quantize, float lowInterval, float upperInterval, byte bit)
    • squareDistanceBulk

      void squareDistanceBulk(float[] query, float[] v0, float[] v1, float[] v2, float[] v3, float[] distances)
    • soarDistanceBulk

      void soarDistanceBulk(float[] v1, float[] c0, float[] c1, float[] c2, float[] c3, float[] originalResidual, float soarLambda, float rnorm, float[] distances)
    • packAsBinary

      void packAsBinary(int[] vector, byte[] packed)
    • transposeHalfByte

      void transposeHalfByte(int[] q, byte[] quantQueryByte)