(&self, other: &Self)
| 403 | |
| 404 | impl Ord for MetricResult { |
| 405 | fn cmp(&self, other: &Self) -> std::cmp::Ordering { |
| 406 | match self { |
| 407 | Self::CosineSimilarity(val) => val.0.total_cmp(&other.get_value()), |
| 408 | Self::CosineDistance(val) => other.get_value().total_cmp(&val.0), |
| 409 | Self::EuclideanDistance(val) => other.get_value().total_cmp(&val.0), |
| 410 | Self::HammingDistance(val) => other.get_value().total_cmp(&val.0), |
| 411 | Self::DotProductDistance(val) => val.0.total_cmp(&other.get_value()), |
| 412 | } |
| 413 | } |
| 414 | } |
| 415 | |
| 416 | impl MetricResult { |
no test coverage detected