pub struct RowMask { /* private fields */ }Expand description
Implementations§
Source§impl RowMask
impl RowMask
Sourcepub fn new(mask: Mask, begin: u64) -> Self
pub fn new(mask: Mask, begin: u64) -> Self
Define a new RowMask with the given mask and offset into the file.
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: &dyn Array, begin: u64, end: u64) -> VortexResult<Self>
pub fn from_array(array: &dyn Array, 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 Mask.
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
The length of the mask is the number of possible rows between the begin and end,
regardless of how many appear in the mask. For the number of masked rows, see true_count.
Sourcepub fn filter_mask(&self) -> &Mask
pub fn filter_mask(&self) -> &Mask
Returns the Mask 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: &dyn Array) -> VortexResult<Option<ArrayRef>>
pub fn filter_array(&self, array: &dyn Array) -> VortexResult<Option<ArrayRef>>
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.
Sourcepub fn true_count(&self) -> usize
pub fn true_count(&self) -> usize
The number of masked rows within the range.
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> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.