mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-06 11:52:57 +00:00
patch
This commit is contained in:
@@ -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,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user