MCPcopy Create free account
hub / github.com/cosdata/cosdata / get_value

Method get_value

src/models/types.rs:418–426  ·  view source on GitHub ↗

gets the bare numerical value stored in the type

(&self)

Source from the content-addressed store, hash-verified

416impl 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 {

Callers 1

cmpMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected