pub trait LearnedIndex {
// Required methods
fn predict(&self, key: &[f32]) -> Result<usize>;
fn insert(&mut self, key: Vec<f32>, value: VectorId) -> Result<()>;
fn search(&self, key: &[f32]) -> Result<Option<VectorId>>;
fn stats(&self) -> IndexStats;
}Expand description
Trait for learned index structures
Required Methods§
Sourcefn stats(&self) -> IndexStats
fn stats(&self) -> IndexStats
Get index statistics