MCPcopy Create free account
hub / github.com/Rustixir/darkbird / lookup

Method lookup

src/darkbird/storage_vector.rs:176–183  ·  view source on GitHub ↗
(&self, vid: &VectorId)

Source from the content-addressed store, hash-verified

174 /// lookup by vector_id
175 #[inline]
176 pub fn lookup(&self, vid: &VectorId) -> Option<(VectorId, Vector)> {
177 match self.vcache.get(vid) {
178 Some(v) => {
179 return Some((v.key().clone(), Vector(v.0.clone())))
180 }
181 None => return None,
182 }
183 }
184
185 /// Finds the k-nearest neighbors to a given query vector in the storage.
186 ///

Callers

nothing calls this directly

Calls 2

VectorClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected