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(values: Bitmap, 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(values: Bitmap, begin: usize, end: usize) -> Self
pub unsafe fn new_unchecked(values: Bitmap, begin: usize, end: usize) -> Self
Construct a RowMask from given bitmap and begin.
§Safety
The maximum set index of the values
must be no greater than end - begin
.
Sourcepub fn from_mask_array(
array: &Array,
begin: usize,
end: usize,
) -> VortexResult<Self>
pub fn from_mask_array( array: &Array, 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: &Array,
begin: usize,
end: usize,
) -> VortexResult<Self>
pub fn from_index_array( array: &Array, begin: usize, end: usize, ) -> VortexResult<Self>
Construct a RowMask from an integral array.
The array values are intepreted as indices and those indices are kept by the returned mask.
pub fn is_empty(&self) -> bool
pub fn begin(&self) -> usize
pub fn end(&self) -> usize
pub fn len(&self) -> usize
Sourcepub fn and_inplace(&mut self, other: &RowMask) -> VortexResult<()>
pub fn and_inplace(&mut self, other: &RowMask) -> VortexResult<()>
Unset, in place, any bits that are unset in other
.
Sourcepub fn filter_array(
&self,
array: impl AsRef<Array>,
) -> VortexResult<Option<Array>>
pub fn filter_array( &self, array: impl AsRef<Array>, ) -> VortexResult<Option<Array>>
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<Array>
pub fn to_mask_array(&self) -> VortexResult<Array>
pub fn shift(self, offset: usize) -> VortexResult<RowMask>
Trait Implementations§
impl Eq for RowMask
impl StructuralPartialEq for RowMask
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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