pub struct IndexIVF { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Index for IndexIVF
impl Index for IndexIVF
fn inner_ptr(&self) -> *mut FaissIndex
fn is_trained(&self) -> bool
fn ntotal(&self) -> u64
fn d(&self) -> u32
fn metric_type(&self) -> MetricType
fn train(&mut self, x: &[f32]) -> Result<()>
fn add(&mut self, x: &[f32]) -> Result<()>
fn add_with_ids(&mut self, x: &[f32], ids: &[Idx]) -> Result<()>
fn search(&mut self, q: &[f32], k: usize) -> Result<SearchResult>
fn search_with_params<P: SearchParams>( &mut self, q: &[f32], k: usize, params: &P, ) -> Result<SearchResult>
fn range_search(&mut self, q: &[f32], radius: f32) -> Result<RangeSearchResult>
fn assign(&mut self, q: &[f32], k: usize) -> Result<Vec<Idx>>
fn reset(&mut self) -> Result<()>
fn remove_ids<S: IDSelector>(&mut self, sel: &S) -> Result<usize>
fn reconstruct(&self, id: Idx) -> Result<Vec<f32>>
fn reconstruct_n(&self, i0: Idx, ni: usize) -> Result<Vec<f32>>
fn sa_code_size(&self) -> Result<usize>
fn sa_encode(&self, x: &[f32]) -> Result<Vec<u8>>
fn sa_decode(&self, bytes: &[u8]) -> Result<Vec<f32>>
fn verbose(&self) -> bool
fn set_verbose(&mut self, verbose: bool)
fn compute_residual(&self, x: &[f32], key: Idx) -> Result<Vec<f32>>
fn compute_residual_n(&self, x: &[f32], keys: &[Idx]) -> Result<Vec<f32>>
Source§impl IvfIndex for IndexIVF
impl IvfIndex for IndexIVF
fn nlist(&self) -> usize
fn nprobe(&self) -> usize
fn set_nprobe(&mut self, nprobe: usize)
fn get_list_size(&self, list_no: usize) -> usize
fn make_direct_map(&mut self, new_type: i32) -> Result<()>
fn merge_from(&mut self, other: &mut impl Index, add_ids: bool) -> Result<()>
fn search_preassigned( &mut self, q: &[f32], k: usize, assign: &[i64], centroid_dis: &[f32], store_pairs: bool, ) -> Result<SearchResult>
impl Send for IndexIVF
impl Sync for IndexIVF
Auto Trait Implementations§
impl Freeze for IndexIVF
impl RefUnwindSafe for IndexIVF
impl Unpin for IndexIVF
impl UnsafeUnpin for IndexIVF
impl UnwindSafe for IndexIVF
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