Enum StructuredQuery.FindNearest.DistanceMeasure

java.lang.Object
java.lang.Enum<StructuredQuery.FindNearest.DistanceMeasure>
com.google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure
All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, Serializable, Comparable<StructuredQuery.FindNearest.DistanceMeasure>
Enclosing class:
StructuredQuery.FindNearest

public static enum StructuredQuery.FindNearest.DistanceMeasure extends Enum<StructuredQuery.FindNearest.DistanceMeasure> implements com.google.protobuf.ProtocolMessageEnum
 The distance measure to use when comparing vectors.
 
Protobuf enum google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure
  • Enum Constant Details

    • DISTANCE_MEASURE_UNSPECIFIED

      public static final StructuredQuery.FindNearest.DistanceMeasure DISTANCE_MEASURE_UNSPECIFIED
       Should not be set.
       
      DISTANCE_MEASURE_UNSPECIFIED = 0;
    • EUCLIDEAN

      public static final StructuredQuery.FindNearest.DistanceMeasure EUCLIDEAN
       Measures the EUCLIDEAN distance between the vectors. See
       [Euclidean](https://en.wikipedia.org/wiki/Euclidean_distance) to learn
       more
       
      EUCLIDEAN = 1;
    • COSINE

      public static final StructuredQuery.FindNearest.DistanceMeasure COSINE
       Compares vectors based on the angle between them, which allows you to
       measure similarity that isn't based on the vectors magnitude.
       We recommend using DOT_PRODUCT with unit normalized vectors instead of
       COSINE distance, which is mathematically equivalent with better
       performance. See [Cosine
       Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to learn
       more.
       
      COSINE = 2;
    • DOT_PRODUCT

      public static final StructuredQuery.FindNearest.DistanceMeasure DOT_PRODUCT
       Similar to cosine but is affected by the magnitude of the vectors. See
       [Dot Product](https://en.wikipedia.org/wiki/Dot_product) to learn more.
       
      DOT_PRODUCT = 3;
    • UNRECOGNIZED

      public static final StructuredQuery.FindNearest.DistanceMeasure UNRECOGNIZED
  • Field Details

    • DISTANCE_MEASURE_UNSPECIFIED_VALUE

      public static final int DISTANCE_MEASURE_UNSPECIFIED_VALUE
       Should not be set.
       
      DISTANCE_MEASURE_UNSPECIFIED = 0;
      See Also:
    • EUCLIDEAN_VALUE

      public static final int EUCLIDEAN_VALUE
       Measures the EUCLIDEAN distance between the vectors. See
       [Euclidean](https://en.wikipedia.org/wiki/Euclidean_distance) to learn
       more
       
      EUCLIDEAN = 1;
      See Also:
    • COSINE_VALUE

      public static final int COSINE_VALUE
       Compares vectors based on the angle between them, which allows you to
       measure similarity that isn't based on the vectors magnitude.
       We recommend using DOT_PRODUCT with unit normalized vectors instead of
       COSINE distance, which is mathematically equivalent with better
       performance. See [Cosine
       Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to learn
       more.
       
      COSINE = 2;
      See Also:
    • DOT_PRODUCT_VALUE

      public static final int DOT_PRODUCT_VALUE
       Similar to cosine but is affected by the magnitude of the vectors. See
       [Dot Product](https://en.wikipedia.org/wiki/Dot_product) to learn more.
       
      DOT_PRODUCT = 3;
      See Also:
  • 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 name
      NullPointerException - if the argument is null
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface com.google.protobuf.Internal.EnumLite
      Specified by:
      getNumber in interface com.google.protobuf.ProtocolMessageEnum
    • valueOf

      @Deprecated public static StructuredQuery.FindNearest.DistanceMeasure valueOf(int value)
      Deprecated.
      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:
      value - 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
    • forNumber

      public static StructuredQuery.FindNearest.DistanceMeasure forNumber(int value)
      Parameters:
      value - The numeric wire value of the corresponding enum entry.
      Returns:
      The enum associated with the given numeric wire value.
    • internalGetValueMap

      public static com.google.protobuf.Internal.EnumLiteMap<StructuredQuery.FindNearest.DistanceMeasure> internalGetValueMap()
    • getValueDescriptor

      public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
      Specified by:
      getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptorForType

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptor

      public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
    • valueOf

      public static StructuredQuery.FindNearest.DistanceMeasure valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
      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:
      desc - 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