Struct faiss::index::RangeSearchResult
source · pub struct RangeSearchResult { /* private fields */ }
Expand description
The outcome of an index range search operation.
Implementations§
source§impl RangeSearchResult
impl RangeSearchResult
pub fn nq(&self) -> usize
pub fn lims(&self) -> &[usize]
sourcepub fn distance_and_labels(&self) -> (&[f32], &[Idx])
pub fn distance_and_labels(&self) -> (&[f32], &[Idx])
getter for labels and respective distances (not sorted):
result for query i
is labels[lims[i] .. lims[i+1]]
sourcepub fn distance_and_labels_mut(&self) -> (&mut [f32], &mut [Idx])
pub fn distance_and_labels_mut(&self) -> (&mut [f32], &mut [Idx])
getter for labels and respective distances (not sorted):
result for query i
is labels[lims[i] .. lims[i+1]]
sourcepub fn distances(&self) -> &[f32]
pub fn distances(&self) -> &[f32]
getter for distances (not sorted):
result for query i
is distances[lims[i] .. lims[i+1]]
sourcepub fn distances_mut(&mut self) -> &mut [f32]
pub fn distances_mut(&mut self) -> &mut [f32]
getter for distances (not sorted):
result for query i
is distances[lims[i] .. lims[i+1]]
sourcepub fn labels(&self) -> &[Idx]
pub fn labels(&self) -> &[Idx]
getter for labels (not sorted):
result for query i
is labels[lims[i] .. lims[i+1]]
sourcepub fn labels_mut(&mut self) -> &mut [Idx]
pub fn labels_mut(&mut self) -> &mut [Idx]
getter for labels (not sorted):
result for query i
is labels[lims[i] .. lims[i+1]]
Trait Implementations§
source§impl Clone for RangeSearchResult
impl Clone for RangeSearchResult
source§fn clone(&self) -> RangeSearchResult
fn clone(&self) -> RangeSearchResult
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RangeSearchResult
impl Debug for RangeSearchResult
source§impl Drop for RangeSearchResult
impl Drop for RangeSearchResult
source§impl PartialEq<RangeSearchResult> for RangeSearchResult
impl PartialEq<RangeSearchResult> for RangeSearchResult
source§fn eq(&self, other: &RangeSearchResult) -> bool
fn eq(&self, other: &RangeSearchResult) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for RangeSearchResult
Auto Trait Implementations§
impl RefUnwindSafe for RangeSearchResult
impl !Send for RangeSearchResult
impl !Sync for RangeSearchResult
impl Unpin for RangeSearchResult
impl UnwindSafe for RangeSearchResult
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