StructuredQuery_FindNearest_DistanceMeasure class final
The distance measure to use when comparing vectors.
Constructors
- StructuredQuery_FindNearest_DistanceMeasure(String value)
-
const
- StructuredQuery_FindNearest_DistanceMeasure.fromJson(Object? json)
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isNotDefault → bool
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → String
-
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Object? -
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- $default → const StructuredQuery_FindNearest_DistanceMeasure
- The default value for StructuredQuery_FindNearest_DistanceMeasure.
- cosine → const StructuredQuery_FindNearest_DistanceMeasure
- COSINE distance 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 to learn more about COSINE similarity and COSINE distance. The resulting COSINE distance decreases the more similar two vectors are.
- distanceMeasureUnspecified → const StructuredQuery_FindNearest_DistanceMeasure
- Should not be set.
- dotProduct → const StructuredQuery_FindNearest_DistanceMeasure
- Similar to cosine but is affected by the magnitude of the vectors. See Dot Product to learn more. The resulting distance increases the more similar two vectors are.
- euclidean → const StructuredQuery_FindNearest_DistanceMeasure
- Measures the EUCLIDEAN distance between the vectors. See Euclidean to learn more. The resulting distance decreases the more similar two vectors are.