gets the bare numerical value stored in the type
(&self)
| 416 | impl MetricResult { |
| 417 | // gets the bare numerical value stored in the type |
| 418 | pub fn get_value(&self) -> f32 { |
| 419 | match self { |
| 420 | MetricResult::CosineSimilarity(value) => value.0, |
| 421 | MetricResult::CosineDistance(value) => value.0, |
| 422 | MetricResult::EuclideanDistance(value) => value.0, |
| 423 | MetricResult::HammingDistance(value) => value.0, |
| 424 | MetricResult::DotProductDistance(value) => value.0, |
| 425 | } |
| 426 | } |
| 427 | |
| 428 | pub fn get_tag_and_value(&self) -> (u8, f32) { |
| 429 | match self { |