pub struct IndexImpl { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Index for IndexImpl
impl Index for IndexImpl
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>>
impl Send for IndexImpl
impl Sync for IndexImpl
Auto Trait Implementations§
impl Freeze for IndexImpl
impl RefUnwindSafe for IndexImpl
impl Unpin for IndexImpl
impl UnsafeUnpin for IndexImpl
impl UnwindSafe for IndexImpl
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