Enum Class DistanceFunction
- All Implemented Interfaces:
Serializable, Comparable<DistanceFunction>, Constable
Distance function
- COSINE: The COSINE distance function
- EUCLIDEAN: The EUCLIDEAN or L2 distance function
- EUCLIDEAN_SQUARED: The squared EUCLIDEAN distance function
- MANHATTAN: The MANHATTAN, TAXICAB or L1 distance function
- INNER_PRODUCT: The INNER_PRODUCT distance function
- NEGATIVE_INNER_PRODUCT: The NEGATIVE_INNER_PRODUCT distance function
- HAMMING: The HAMMING distance function
- JACCARD: The JACCARD distance function
Default value: COSINE
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe COSINE distance functionThe EUCLIDEAN or L2 distance functionThe squared EUCLIDEAN distance functionThe HAMMING distance functionThe INNER_PRODUCT distance functionThe JACCARD distance functionThe MANHATTAN, TAXICAB or L1 distance functionThe NEGATIVE_INNER_PRODUCT distance function -
Method Summary
Modifier and TypeMethodDescriptionstatic DistanceFunctionReturns the enum constant of this class with the specified name.static DistanceFunction[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
COSINE
The COSINE distance function -
EUCLIDEAN
The EUCLIDEAN or L2 distance function -
EUCLIDEAN_SQUARED
The squared EUCLIDEAN distance function -
MANHATTAN
The MANHATTAN, TAXICAB or L1 distance function -
INNER_PRODUCT
The INNER_PRODUCT distance function -
NEGATIVE_INNER_PRODUCT
The NEGATIVE_INNER_PRODUCT distance function -
HAMMING
The HAMMING distance function -
JACCARD
The JACCARD distance function
-
-
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
-