Struct faiss::index::refine_flat::RefineFlatIndexImpl
source · pub struct RefineFlatIndexImpl<BI> { /* private fields */ }
Expand description
Native implementation of a RefineFlat index.
Implementations§
source§impl<BI: NativeIndex> RefineFlatIndexImpl<BI>
impl<BI: NativeIndex> RefineFlatIndexImpl<BI>
Trait Implementations§
source§impl<BI> ConcurrentIndex for RefineFlatIndexImpl<BI>where
BI: ConcurrentIndex,
impl<BI> ConcurrentIndex for RefineFlatIndexImpl<BI>where BI: ConcurrentIndex,
source§fn assign(&self, query: &[f32], k: usize) -> Result<AssignSearchResult>
fn assign(&self, query: &[f32], k: usize) -> Result<AssignSearchResult>
Similar to
search
, but only provides the labels.source§fn search(&self, query: &[f32], k: usize) -> Result<SearchResult>
fn search(&self, query: &[f32], k: usize) -> Result<SearchResult>
Perform a search for the
k
closest vectors to the given query vectors.source§fn range_search(&self, query: &[f32], radius: f32) -> Result<RangeSearchResult>
fn range_search(&self, query: &[f32], radius: f32) -> Result<RangeSearchResult>
Perform a ranged search for the vectors closest to the given query vectors
by the given radius.
source§impl<BI: Debug> Debug for RefineFlatIndexImpl<BI>
impl<BI: Debug> Debug for RefineFlatIndexImpl<BI>
source§impl<BI> Drop for RefineFlatIndexImpl<BI>
impl<BI> Drop for RefineFlatIndexImpl<BI>
source§impl FromInnerPtr for RefineFlatIndexImpl<IndexImpl>
impl FromInnerPtr for RefineFlatIndexImpl<IndexImpl>
source§unsafe fn from_inner_ptr(inner_ptr: *mut FaissIndex) -> Self
unsafe fn from_inner_ptr(inner_ptr: *mut FaissIndex) -> Self
Create an index using the given pointer to a native object. Read more
source§impl<BI> Index for RefineFlatIndexImpl<BI>
impl<BI> Index for RefineFlatIndexImpl<BI>
source§fn is_trained(&self) -> bool
fn is_trained(&self) -> bool
Whether the Index does not require training, or if training is done already
source§fn metric_type(&self) -> MetricType
fn metric_type(&self) -> MetricType
The metric type assumed by the index
source§fn add(&mut self, x: &[f32]) -> Result<()>
fn add(&mut self, x: &[f32]) -> Result<()>
Add new data vectors to the index.
This assumes a C-contiguous memory slice of vectors, where the total
number of vectors is
x.len() / d
.source§fn add_with_ids(&mut self, x: &[f32], xids: &[Idx]) -> Result<()>
fn add_with_ids(&mut self, x: &[f32], xids: &[Idx]) -> Result<()>
Add new data vectors to the index with IDs.
This assumes a C-contiguous memory slice of vectors, where the total
number of vectors is
x.len() / d
.
Not all index types may support this operation.source§fn assign(&mut self, query: &[f32], k: usize) -> Result<AssignSearchResult>
fn assign(&mut self, query: &[f32], k: usize) -> Result<AssignSearchResult>
Similar to
search
, but only provides the labels.source§fn search(&mut self, query: &[f32], k: usize) -> Result<SearchResult>
fn search(&mut self, query: &[f32], k: usize) -> Result<SearchResult>
Perform a search for the
k
closest vectors to the given query vectors.source§fn range_search(
&mut self,
query: &[f32],
radius: f32
) -> Result<RangeSearchResult>
fn range_search( &mut self, query: &[f32], radius: f32 ) -> Result<RangeSearchResult>
Perform a ranged search for the vectors closest to the given query vectors
by the given radius.
source§fn remove_ids(&mut self, sel: &IdSelector) -> Result<usize>
fn remove_ids(&mut self, sel: &IdSelector) -> Result<usize>
Remove data vectors represented by IDs.
source§fn set_verbose(&mut self, value: bool)
fn set_verbose(&mut self, value: bool)
Set Index verbosity level
source§impl<BI> NativeIndex for RefineFlatIndexImpl<BI>
impl<BI> NativeIndex for RefineFlatIndexImpl<BI>
source§fn inner_ptr(&self) -> *mut FaissIndex
fn inner_ptr(&self) -> *mut FaissIndex
Retrieve a pointer to the native index object.
source§impl<I> TryClone for RefineFlatIndexImpl<I>
impl<I> TryClone for RefineFlatIndexImpl<I>
source§impl TryFromInnerPtr for RefineFlatIndexImpl<IndexImpl>
impl TryFromInnerPtr for RefineFlatIndexImpl<IndexImpl>
source§unsafe fn try_from_inner_ptr(inner_ptr: *mut FaissIndex) -> Result<Self>where
Self: Sized,
unsafe fn try_from_inner_ptr(inner_ptr: *mut FaissIndex) -> Result<Self>where Self: Sized,
Create an index using the given pointer to a native object,
checking that the index behind the given pointer
is compatible with the target index type.
If the inner index is not compatible with the intended target type
(e.g. creating a
FlatIndex
out of a FaissIndexLSH
),
an error is returned. Read moreimpl<BI: CpuIndex> CpuIndex for RefineFlatIndexImpl<BI>
impl<BI: Send> Send for RefineFlatIndexImpl<BI>
impl<BI: Sync> Sync for RefineFlatIndexImpl<BI>
Auto Trait Implementations§
impl<BI> RefUnwindSafe for RefineFlatIndexImpl<BI>where BI: RefUnwindSafe,
impl<BI> Unpin for RefineFlatIndexImpl<BI>where BI: Unpin,
impl<BI> UnwindSafe for RefineFlatIndexImpl<BI>where BI: UnwindSafe,
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