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