pub struct SparseImpactIndex { /* private fields */ }Expand description
Blocked inverted index with summaries plus a forward index.
Implementations§
Source§impl SparseImpactIndex
impl SparseImpactIndex
Sourcepub fn build(
csr: CsrView<'_>,
params: SparseBuildParams,
) -> Result<Self, SparseIndexError>
pub fn build( csr: CsrView<'_>, params: SparseBuildParams, ) -> Result<Self, SparseIndexError>
Builds the index over the rows of csr. Zero values are dropped.
pub fn n_docs(&self) -> usize
pub fn n_dims(&self) -> usize
Sourcepub fn memory_bytes(&self) -> usize
pub fn memory_bytes(&self) -> usize
Bytes held by the index arrays.
Sourcepub fn block_stats(&self) -> (usize, usize)
pub fn block_stats(&self) -> (usize, usize)
Number of blocks and kept postings.
Sourcepub fn searcher(&self) -> SparseSearcher<'_>
pub fn searcher(&self) -> SparseSearcher<'_>
Scratch for SparseSearcher::search; one per thread.
Source§impl SparseImpactIndex
impl SparseImpactIndex
Sourcepub fn search_batch(
&self,
queries: CsrView<'_>,
k: usize,
params: SparseSearchParams,
) -> Result<Vec<u32>, SparseIndexError>
pub fn search_batch( &self, queries: CsrView<'_>, k: usize, params: SparseSearchParams, ) -> Result<Vec<u32>, SparseIndexError>
Searches the CSR query rows in parallel; row i of the result holds query i’s ids,
best first, padded with u32::MAX.
Auto Trait Implementations§
impl Freeze for SparseImpactIndex
impl RefUnwindSafe for SparseImpactIndex
impl Send for SparseImpactIndex
impl Sync for SparseImpactIndex
impl Unpin for SparseImpactIndex
impl UnsafeUnpin for SparseImpactIndex
impl UnwindSafe for SparseImpactIndex
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.