Interface VectorCompressor<T>

All Known Implementing Classes:
BinaryQuantization, ProductQuantization

public interface VectorCompressor<T>
Interface for vector compression. T is the encoded (compressed) vector type; it will be an array type.
  • Method Details

    • encodeAll

      default T[] encodeAll(List<float[]> vectors)
    • encodeAll

      T[] encodeAll(List<float[]> vectors, ForkJoinPool simdExecutor)
    • encode

      T encode(float[] v)
    • write

      void write(DataOutput out) throws IOException
      Throws:
      IOException
    • createCompressedVectors

      CompressedVectors createCompressedVectors(Object[] compressedVectors)
      Parameters:
      compressedVectors - must match the type T for this VectorCompressor, but it is declared as Object because we want callers to be able to use this without committing to a specific type T.