Package com.azure.cosmos.models
Enum CosmosVectorDistanceFunction
- All Implemented Interfaces:
Serializable
,Comparable<CosmosVectorDistanceFunction>
,java.lang.constant.Constable
Distance Function for the embeddings in the Cosmos DB database service.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionRepresents the cosine distance function.Represents the dot product distance function.Represents the euclidean distance function. -
Method Summary
Modifier and TypeMethodDescriptionstatic CosmosVectorDistanceFunction
fromString
(String value) Method to retrieve the enum constant by its overWireValue.toString()
static CosmosVectorDistanceFunction
Returns the enum constant of this type with the specified name.static CosmosVectorDistanceFunction[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
EUCLIDEAN
Represents the euclidean distance function. -
COSINE
Represents the cosine distance function. -
DOT_PRODUCT
Represents the dot product distance function.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
toString
- Overrides:
toString
in classEnum<CosmosVectorDistanceFunction>
-
fromString
Method to retrieve the enum constant by its overWireValue.- Parameters:
value
- the overWire value of the enum constant- Returns:
- the matching CosmosVectorDataType
- Throws:
IllegalArgumentException
- if no matching enum constant is found
-