pub struct SelectionVector { /* private fields */ }Expand description
A selection vector indicating which rows are active.
Used for efficient filtering without copying data.
Implementations§
Source§impl SelectionVector
impl SelectionVector
Sourcepub const MAX_CAPACITY: usize
pub const MAX_CAPACITY: usize
Maximum capacity (limited to u16 for space efficiency).
Sourcepub fn new_all(count: usize) -> Self
pub fn new_all(count: usize) -> Self
Creates a new selection vector selecting all rows up to count.
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Creates a new selection vector with the given capacity.
Sourcepub fn from_predicate<F>(count: usize, predicate: F) -> Self
pub fn from_predicate<F>(count: usize, predicate: F) -> Self
Creates a selection vector from a predicate.
Selects all indices where the predicate returns true.
Sourcepub fn filter<F>(&self, predicate: F) -> Self
pub fn filter<F>(&self, predicate: F) -> Self
Filters this selection by another predicate.
Returns a new selection containing only indices that pass the predicate.
Sourcepub fn intersect(&self, other: &Self) -> Self
pub fn intersect(&self, other: &Self) -> Self
Computes the intersection of two selection vectors.
Trait Implementations§
Source§impl Clone for SelectionVector
impl Clone for SelectionVector
Source§fn clone(&self) -> SelectionVector
fn clone(&self) -> SelectionVector
Returns a duplicate 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 SelectionVector
impl Debug for SelectionVector
Source§impl Default for SelectionVector
impl Default for SelectionVector
Source§impl IntoIterator for SelectionVector
impl IntoIterator for SelectionVector
Auto Trait Implementations§
impl Freeze for SelectionVector
impl RefUnwindSafe for SelectionVector
impl Send for SelectionVector
impl Sync for SelectionVector
impl Unpin for SelectionVector
impl UnwindSafe for SelectionVector
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