pub struct IndexIDMap2 { /* private fields */ }Implementations§
Source§impl IndexIDMap2
impl IndexIDMap2
pub fn new(index: IndexImpl) -> Result<Self>
pub fn from_index(index: IndexImpl) -> Result<Self>
pub fn sub_index(&self) -> *mut FaissIndex
pub fn construct_rev_map(&mut self)
Trait Implementations§
Source§impl Drop for IndexIDMap2
impl Drop for IndexIDMap2
Source§impl Index for IndexIDMap2
impl Index for IndexIDMap2
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 IndexIDMap2
impl Sync for IndexIDMap2
Auto Trait Implementations§
impl Freeze for IndexIDMap2
impl RefUnwindSafe for IndexIDMap2
impl Unpin for IndexIDMap2
impl UnsafeUnpin for IndexIDMap2
impl UnwindSafe for IndexIDMap2
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