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 more