pub struct CrackIndex { /* private fields */ }Expand description
Adaptive crack index for progressive column partitioning.
Maintains a permutation of row indices and a sorted set of crack points. Each filter operation partitions the relevant region around the predicate pivot, progressively sorting the column across repeated queries.
Only works with numeric columns (values convertible to f64).
§Example
ⓘ
let mut crack = CrackIndex::new(column.len());
let gt5 = crack.filter_gt(&column, 5.0); // partitions around 5.0
let gt3 = crack.filter_gt(&column, 3.0); // refines: only re-scans [0, 5.0] regionImplementations§
Source§impl CrackIndex
impl CrackIndex
Sourcepub fn num_cracks(&self) -> usize
pub fn num_cracks(&self) -> usize
Number of crack points recorded so far.
Sourcepub fn filter_gt(&mut self, column: &Column, value: f64) -> Vec<usize>
pub fn filter_gt(&mut self, column: &Column, value: f64) -> Vec<usize>
Return row indices where column[row] > value.
Sourcepub fn filter_lte(&mut self, column: &Column, value: f64) -> Vec<usize>
pub fn filter_lte(&mut self, column: &Column, value: f64) -> Vec<usize>
Return row indices where column[row] <= value.
Sourcepub fn filter_gte(&mut self, column: &Column, value: f64) -> Vec<usize>
pub fn filter_gte(&mut self, column: &Column, value: f64) -> Vec<usize>
Return row indices where column[row] >= value.
Auto Trait Implementations§
impl Freeze for CrackIndex
impl RefUnwindSafe for CrackIndex
impl Send for CrackIndex
impl Sync for CrackIndex
impl Unpin for CrackIndex
impl UnsafeUnpin for CrackIndex
impl UnwindSafe for CrackIndex
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