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

Method add_batch

nodedb-vector/src/ivf.rs:123–127  ·  view source on GitHub ↗

Batch add vectors.

(&mut self, vectors: &[&[f32]])

Source from the content-addressed store, hash-verified

121
122 /// Batch add vectors.
123 pub fn add_batch(&mut self, vectors: &[&[f32]]) {
124 for v in vectors {
125 self.add(v);
126 }
127 }
128
129 /// Search: find top-k nearest neighbors.
130 pub fn search(&self, query: &[f32], top_k: usize) -> Vec<SearchResult> {

Callers 1

train_and_searchFunction · 0.45

Calls 1

addMethod · 0.45

Tested by 1

train_and_searchFunction · 0.36