pub struct RowMask { /* private fields */ }Expand description
Bitmap of selected rows within given [begin, end) row range
Implementations§
Source§impl RowMask
impl RowMask
pub fn try_new( bitmask: ArrayData, begin: usize, end: usize, ) -> VortexResult<Self>
Sourcepub fn new_valid_between(begin: usize, end: usize) -> Self
pub fn new_valid_between(begin: usize, end: usize) -> Self
Construct a RowMask which is valid in the given range.
Sourcepub fn new_invalid_between(begin: usize, end: usize) -> Self
pub fn new_invalid_between(begin: usize, end: usize) -> Self
Construct a RowMask which is invalid everywhere in the given range.
Sourcepub unsafe fn new_unchecked(
bitmask: ArrayData,
begin: usize,
end: usize,
) -> Self
pub unsafe fn new_unchecked( bitmask: ArrayData, begin: usize, end: usize, ) -> Self
Construct a RowMask from given bitmask, begin and end.
§Safety
The bitmask must be of a nonnullable bool array and length of end - begin
Sourcepub fn from_mask_array(
array: &ArrayData,
begin: usize,
end: usize,
) -> VortexResult<Self>
pub fn from_mask_array( array: &ArrayData, begin: usize, end: usize, ) -> VortexResult<Self>
Construct a RowMask from a Boolean typed array.
True-valued positions are kept by the returned mask.
Sourcepub fn from_index_array(
array: &ArrayData,
begin: usize,
end: usize,
) -> VortexResult<Self>
pub fn from_index_array( array: &ArrayData, begin: usize, end: usize, ) -> VortexResult<Self>
Construct a RowMask from an integral array.
The array values are interpreted as indices and those indices are kept by the returned mask.
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 is_empty(&self) -> bool
pub fn begin(&self) -> usize
pub fn end(&self) -> usize
pub fn len(&self) -> usize
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
pub fn to_indices_array(&self) -> VortexResult<ArrayData>
pub fn shift(self, offset: usize) -> VortexResult<RowMask>
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