pub struct BigramFilter { /* private fields */ }Expand description
Inverted bigram index with optional “skip-1” extension Copmressed into bitset for minimal usage, the layout of this struct actually matters
Implementations§
Source§impl BigramFilter
impl BigramFilter
Sourcepub fn query(&self, pattern: &[u8]) -> Option<Vec<u64>>
pub fn query(&self, pattern: &[u8]) -> Option<Vec<u64>>
AND the posting lists for all query bigrams (consecutive + skip). Returns None if no query bigrams are tracked.
Sourcepub fn set_skip_index(&mut self, skip: BigramFilter)
pub fn set_skip_index(&mut self, skip: BigramFilter)
Attach a skip-1 bigram index for tighter candidate filtering.
pub fn is_candidate(candidates: &[u64], file_idx: usize) -> bool
pub fn count_candidates(candidates: &[u64]) -> usize
pub fn is_ready(&self) -> bool
pub fn file_count(&self) -> usize
pub fn columns_used(&self) -> usize
Sourcepub fn heap_bytes(&self) -> usize
pub fn heap_bytes(&self) -> usize
Total heap bytes used by this index (lookup + dense data + skip).
Sourcepub fn lookup(&self) -> &[u16]
pub fn lookup(&self) -> &[u16]
Raw lookup table (65536 entries mapping bigram key → column index).
Sourcepub fn dense_data(&self) -> &[u64]
pub fn dense_data(&self) -> &[u64]
Flat dense bitset data at fixed stride words.
Sourcepub fn dense_count(&self) -> usize
pub fn dense_count(&self) -> usize
Number of dense columns retained after compression.
Sourcepub fn skip_index(&self) -> Option<&BigramFilter>
pub fn skip_index(&self) -> Option<&BigramFilter>
Reference to the optional skip-1 bigram sub-index.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BigramFilter
impl RefUnwindSafe for BigramFilter
impl Send for BigramFilter
impl Sync for BigramFilter
impl Unpin for BigramFilter
impl UnsafeUnpin for BigramFilter
impl UnwindSafe for BigramFilter
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 more