pub struct IndexSlot;Expand description
Generic Index slot placeholder. Bind a concrete IndexRuntime via
Node::with_index(...). Exposes the three role-method DSL
operations: Add, Search,
Remove.
Implementations§
Source§impl IndexSlot
impl IndexSlot
Sourcepub fn add(&self, g: &mut Graph, vec: Output) -> Output
pub fn add(&self, g: &mut Graph, vec: Output) -> Output
Add(vec) -> cmd - Shape 2 (stateful insert).
Sourcepub fn search(&self, g: &mut Graph, query: Output, k: i64) -> Output
pub fn search(&self, g: &mut Graph, query: Output, k: i64) -> Output
Search(query, k=...) - Shape 2 typically, Shape 1 for
in-memory flat indexes.
Sourcepub fn remove(&self, g: &mut Graph, id: Output) -> Output
pub fn remove(&self, g: &mut Graph, id: Output) -> Output
Remove(id) -> cmd - Shape 2 (stateful delete).
Sourcepub fn train(&self, g: &mut Graph, samples: Output) -> Output
pub fn train(&self, g: &mut Graph, samples: Output) -> Output
Train(samples) -> trigger — fire-and-forget calibration pass.
The output is TYPE_TRIGGER so authors that need to gate body
ops on training completion can wire the trigger through a
bb.barrier or place the call in Module::bootstrap to run
before body ops fire.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IndexSlot
impl RefUnwindSafe for IndexSlot
impl Send for IndexSlot
impl Sync for IndexSlot
impl Unpin for IndexSlot
impl UnsafeUnpin for IndexSlot
impl UnwindSafe for IndexSlot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more