MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / cmp

Method cmp

nodedb-vector/src/matryoshka.rs:108–113  ·  view source on GitHub ↗
(&self, other: &Self)

Source from the content-addressed store, hash-verified

106
107impl Ord for HeapEntry {
108 fn cmp(&self, other: &Self) -> std::cmp::Ordering {
109 // Max-heap by distance (NaN treated as largest).
110 self.dist
111 .partial_cmp(&other.dist)
112 .unwrap_or(std::cmp::Ordering::Equal)
113 }
114}
115
116/// Two-stage Matryoshka search.

Callers 1

partial_cmpMethod · 0.45

Calls 1

partial_cmpMethod · 0.45

Tested by

no test coverage detected