Package org.elasticsearch.nativeaccess
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>
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionScores multiple vectors against a single vector.Scores multiple vectors against a single vector, with an offset array to determine the vectors to score.Scores multiple vectors against a single vector, using an array of direct memory addresses to locate each vector.Scores a single vector against another. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static VectorSimilarityFunctions.Operation[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SINGLE
Scores a single vector against another.Method handle takes arguments
(MemorySegment, MemorySegment, int):- First vector
- Second vector
- Number of dimensions, or for bbq, the number of index bytes
VectorSimilarityFunctions.DataType. -
BULK
Scores multiple vectors against a single vector.Method handle takes arguments
(MemorySegment, MemorySegment, int, int, MemorySegment:- Multiple vectors to score
a - Single vector to score against
- Number of dimensions, or for bbq, the number of index bytes
- Number of vectors in
a - Score results, as 4-byte floats
- Multiple vectors to score
-
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:- Multiple vectors to score
- Single vector to score against
- Number of dimensions, or for bbq, the number of index bytes
- Number of bytes between the start of one vector and the start of the next vector in
a - Array of 4-byte ints containing indices of vectors to score in
a - Number of vectors to score
- Score results, as 4-byte floats, in order of iteration through the offset array
-
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):- Array of 8-byte longs containing the native memory address of each vector
- Single vector to score against
- Number of dimensions, or for bbq, the number of index bytes
- Number of vectors to score
- Score results, as 4-byte floats
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-