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

Method get_vector

nodedb-vector/src/flat.rs:281–289  ·  view source on GitHub ↗
(&self, id: u32)

Source from the content-addressed store, hash-verified

279 }
280
281 pub fn get_vector(&self, id: u32) -> Option<&[f32]> {
282 let idx = id as usize;
283 if idx < self.deleted.len() && !self.deleted[idx] {
284 let start = idx * self.dim;
285 Some(&self.data[start..start + self.dim])
286 } else {
287 None
288 }
289 }
290
291 /// Raw access bypassing tombstone filter — used by snapshot/restore.
292 pub fn get_vector_raw(&self, id: u32) -> Option<&[f32]> {

Callers 2

adaptive_searchFunction · 0.45
start_hnsw_rebuildMethod · 0.45

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected