pub struct RowMask { /* private fields */ }Expand description
Implementations§
Source§impl RowMask
impl RowMask
pub fn new(mask: FilterMask, begin: u64) -> Self
Sourcepub fn new_valid_between(begin: u64, end: u64) -> Self
pub fn new_valid_between(begin: u64, end: u64) -> Self
Construct a RowMask which is valid in the given range.
§Panics
If the size of the range is too large to fit into a usize.
Sourcepub fn new_invalid_between(begin: u64, end: u64) -> Self
pub fn new_invalid_between(begin: u64, end: u64) -> Self
Construct a RowMask which is invalid everywhere in the given range.
Sourcepub fn from_array(array: &ArrayData, begin: u64, end: u64) -> VortexResult<Self>
pub fn from_array(array: &ArrayData, begin: u64, end: u64) -> VortexResult<Self>
Creates a RowMask from an array, only supported boolean and integer types.
Sourcepub fn is_disjoint(&self, range: impl RangeBounds<u64>) -> bool
pub fn is_disjoint(&self, range: impl RangeBounds<u64>) -> bool
Whether the mask is disjoint with the given range.
This function may return false negatives, but never false positives.
TODO(ngates): improve this function to take into account the FilterMask.
Sourcepub fn and_bitmask(&self, bitmask: ArrayData) -> VortexResult<Self>
pub fn and_bitmask(&self, bitmask: ArrayData) -> VortexResult<Self>
Combine the RowMask with bitmask values resulting in new RowMask containing only values true in the bitmask
pub fn and_rowmask(self, other: RowMask) -> VortexResult<Self>
pub fn is_all_false(&self) -> bool
pub fn begin(&self) -> u64
pub fn end(&self) -> u64
pub fn len(&self) -> usize
Sourcepub fn filter_mask(&self) -> &FilterMask
pub fn filter_mask(&self) -> &FilterMask
Returns the FilterMask whose true values are relative to the range of this RowMask.
Sourcepub fn slice(&self, begin: u64, end: u64) -> VortexResult<Self>
pub fn slice(&self, begin: u64, end: u64) -> VortexResult<Self>
Limit mask to [begin..end) range
Sourcepub fn filter_array(
&self,
array: impl AsRef<ArrayData>,
) -> VortexResult<Option<ArrayData>>
pub fn filter_array( &self, array: impl AsRef<ArrayData>, ) -> VortexResult<Option<ArrayData>>
Filter array with this RowMask.
This function assumes that Array is no longer than the mask length and that the mask starts on same offset as the array, i.e. the beginning of the array corresponds to the beginning of the mask with begin = 0
Sourcepub fn shift(self, offset: u64) -> VortexResult<RowMask>
pub fn shift(self, offset: u64) -> VortexResult<RowMask>
Shift the RowMask down by the given offset.
pub fn true_count(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RowMask
impl RefUnwindSafe for RowMask
impl Send for RowMask
impl Sync for RowMask
impl Unpin for RowMask
impl UnwindSafe for RowMask
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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