Enum FeatureView.IndexConfig.DistanceMeasureType

java.lang.Object
java.lang.Enum<FeatureView.IndexConfig.DistanceMeasureType>
com.google.cloud.aiplatform.v1.FeatureView.IndexConfig.DistanceMeasureType
All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, Serializable, Comparable<FeatureView.IndexConfig.DistanceMeasureType>
Enclosing class:
FeatureView.IndexConfig

public static enum FeatureView.IndexConfig.DistanceMeasureType extends Enum<FeatureView.IndexConfig.DistanceMeasureType> implements com.google.protobuf.ProtocolMessageEnum
 The distance measure used in nearest neighbor search.
 
Protobuf enum google.cloud.aiplatform.v1.FeatureView.IndexConfig.DistanceMeasureType
  • Enum Constant Details

    • DISTANCE_MEASURE_TYPE_UNSPECIFIED

      public static final FeatureView.IndexConfig.DistanceMeasureType DISTANCE_MEASURE_TYPE_UNSPECIFIED
       Should not be set.
       
      DISTANCE_MEASURE_TYPE_UNSPECIFIED = 0;
    • SQUARED_L2_DISTANCE

      public static final FeatureView.IndexConfig.DistanceMeasureType SQUARED_L2_DISTANCE
       Euclidean (L_2) Distance.
       
      SQUARED_L2_DISTANCE = 1;
    • COSINE_DISTANCE

      public static final FeatureView.IndexConfig.DistanceMeasureType COSINE_DISTANCE
       Cosine Distance. Defined as 1 - cosine similarity.
      
       We strongly suggest using DOT_PRODUCT_DISTANCE + UNIT_L2_NORM instead
       of COSINE distance. Our algorithms have been more optimized for
       DOT_PRODUCT distance which, when combined with UNIT_L2_NORM, is
       mathematically equivalent to COSINE distance and results in the same
       ranking.
       
      COSINE_DISTANCE = 2;
    • DOT_PRODUCT_DISTANCE

      public static final FeatureView.IndexConfig.DistanceMeasureType DOT_PRODUCT_DISTANCE
       Dot Product Distance. Defined as a negative of the dot product.
       
      DOT_PRODUCT_DISTANCE = 3;
    • UNRECOGNIZED

      public static final FeatureView.IndexConfig.DistanceMeasureType UNRECOGNIZED
  • Field Details

    • DISTANCE_MEASURE_TYPE_UNSPECIFIED_VALUE

      public static final int DISTANCE_MEASURE_TYPE_UNSPECIFIED_VALUE
       Should not be set.
       
      DISTANCE_MEASURE_TYPE_UNSPECIFIED = 0;
      See Also:
    • SQUARED_L2_DISTANCE_VALUE

      public static final int SQUARED_L2_DISTANCE_VALUE
       Euclidean (L_2) Distance.
       
      SQUARED_L2_DISTANCE = 1;
      See Also:
    • COSINE_DISTANCE_VALUE

      public static final int COSINE_DISTANCE_VALUE
       Cosine Distance. Defined as 1 - cosine similarity.
      
       We strongly suggest using DOT_PRODUCT_DISTANCE + UNIT_L2_NORM instead
       of COSINE distance. Our algorithms have been more optimized for
       DOT_PRODUCT distance which, when combined with UNIT_L2_NORM, is
       mathematically equivalent to COSINE distance and results in the same
       ranking.
       
      COSINE_DISTANCE = 2;
      See Also:
    • DOT_PRODUCT_DISTANCE_VALUE

      public static final int DOT_PRODUCT_DISTANCE_VALUE
       Dot Product Distance. Defined as a negative of the dot product.
       
      DOT_PRODUCT_DISTANCE = 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 FeatureView.IndexConfig.DistanceMeasureType 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 FeatureView.IndexConfig.DistanceMeasureType 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<FeatureView.IndexConfig.DistanceMeasureType> 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 com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
    • valueOf

      public static FeatureView.IndexConfig.DistanceMeasureType 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