Enum Class VectorSimilarityFunctions.Operation

java.lang.Object
java.lang.Enum<VectorSimilarityFunctions.Operation>
org.elasticsearch.nativeaccess.VectorSimilarityFunctions.Operation
All Implemented Interfaces:
Serializable, Comparable<VectorSimilarityFunctions.Operation>, Constable
Enclosing interface:
VectorSimilarityFunctions

public static enum VectorSimilarityFunctions.Operation extends Enum<VectorSimilarityFunctions.Operation>
  • Enum Constant Details

    • SINGLE

      public static final VectorSimilarityFunctions.Operation SINGLE
      Scores a single vector against another.

      Method handle takes arguments (MemorySegment, MemorySegment, int):

      1. First vector
      2. Second vector
      3. Number of dimensions, or for bbq, the number of index bytes
      Return value type is determined by the VectorSimilarityFunctions.DataType.
    • BULK

      public static final VectorSimilarityFunctions.Operation BULK
      Scores multiple vectors against a single vector.

      Method handle takes arguments (MemorySegment, MemorySegment, int, int, MemorySegment:

      1. Multiple vectors to score a
      2. Single vector to score against
      3. Number of dimensions, or for bbq, the number of index bytes
      4. Number of vectors in a
      5. Score results, as 4-byte floats
    • BULK_OFFSETS

      public static final VectorSimilarityFunctions.Operation BULK_OFFSETS
      Scores multiple vectors against a single vector, with an offset array to determine the vectors to score.

      Method handle takes arguments (MemorySegment, MemorySegment, int, int, MemorySegment, int, MemorySegment:

      1. Multiple vectors to score
      2. Single vector to score against
      3. Number of dimensions, or for bbq, the number of index bytes
      4. Number of bytes between the start of one vector and the start of the next vector in a
      5. Array of 4-byte ints containing indices of vectors to score in a
      6. Number of vectors to score
      7. Score results, as 4-byte floats, in order of iteration through the offset array
    • BULK_SPARSE

      public static final VectorSimilarityFunctions.Operation BULK_SPARSE
      Scores multiple vectors against a single vector, using an array of direct memory addresses to locate each vector.

      Method handle takes arguments (MemorySegment, MemorySegment, int, int, MemorySegment):

      1. Array of 8-byte longs containing the native memory address of each vector
      2. Single vector to score against
      3. Number of dimensions, or for bbq, the number of index bytes
      4. Number of vectors to score
      5. Score results, as 4-byte floats
  • Method Details

    • values

      public static VectorSimilarityFunctions.Operation[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static VectorSimilarityFunctions.Operation valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null