Enum SimilarityMetric

java.lang.Object
java.lang.Enum<SimilarityMetric>
com.datastax.astra.client.model.SimilarityMetric
All Implemented Interfaces:
Serializable, Comparable<SimilarityMetric>, java.lang.constant.Constable

public enum SimilarityMetric extends Enum<SimilarityMetric>
Similarity metric.
  • Enum Constant Details

    • COSINE

      public static final SimilarityMetric COSINE
      Distance with cosine.
    • EUCLIDEAN

      public static final SimilarityMetric EUCLIDEAN
      Distance with Euclidean (L2).
    • DOT_PRODUCT

      public static final SimilarityMetric DOT_PRODUCT
      Distance with dot+product (L1).
  • Method Details

    • values

      public static SimilarityMetric[] 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

      public static SimilarityMetric valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • fromValue

      public static SimilarityMetric fromValue(String value)
      Build from the key.
      Parameters:
      value - similarity value
      Returns:
      similarity enum