| 6 | use crate::models::types::VectorData; |
| 7 | |
| 8 | pub trait DistanceFunction: std::fmt::Debug + Send + Sync { |
| 9 | type Item; |
| 10 | fn calculate( |
| 11 | &self, |
| 12 | x: &VectorData, |
| 13 | y: &VectorData, |
| 14 | is_indexing: bool, |
| 15 | ) -> Result<Self::Item, DistanceError>; |
| 16 | } |
| 17 | |
| 18 | #[derive(Debug)] |
| 19 | pub enum DistanceError { |
nothing calls this directly
no outgoing calls
no test coverage detected