Compare commits

...

1 Commits

Author SHA1 Message Date
rmeng
24526bda4c patch 2024-05-15 13:44:27 -04:00

View File

@@ -238,9 +238,6 @@ pub enum DistanceType {
/// distance has a range of (-∞, ∞). If the vectors are normalized (i.e. their /// distance has a range of (-∞, ∞). If the vectors are normalized (i.e. their
/// L2 norm is 1), then dot distance is equivalent to the cosine distance. /// L2 norm is 1), then dot distance is equivalent to the cosine distance.
Dot, Dot,
/// Hamming distance. Hamming distance is a distance metric that measures
/// the number of positions at which the corresponding elements are different.
Hamming,
} }
impl From<DistanceType> for LanceDistanceType { impl From<DistanceType> for LanceDistanceType {
@@ -249,7 +246,6 @@ impl From<DistanceType> for LanceDistanceType {
DistanceType::L2 => Self::L2, DistanceType::L2 => Self::L2,
DistanceType::Cosine => Self::Cosine, DistanceType::Cosine => Self::Cosine,
DistanceType::Dot => Self::Dot, DistanceType::Dot => Self::Dot,
DistanceType::Hamming => Self::Hamming,
} }
} }
} }
@@ -260,7 +256,6 @@ impl From<LanceDistanceType> for DistanceType {
LanceDistanceType::L2 => Self::L2, LanceDistanceType::L2 => Self::L2,
LanceDistanceType::Cosine => Self::Cosine, LanceDistanceType::Cosine => Self::Cosine,
LanceDistanceType::Dot => Self::Dot, LanceDistanceType::Dot => Self::Dot,
LanceDistanceType::Hamming => Self::Hamming,
} }
} }
} }