pub struct NullableFactor {
pub fct: FctColumn,
pub validity: BitMask,
}Expand description
A FctColumn with a validity bitmap. Null cells have validity=false.
Null is NOT a level; data[i] for a null row is 0 (sentinel, must not be used).
Fields§
§fct: FctColumn§validity: BitMaskImplementations§
Source§impl NullableFactor
impl NullableFactor
Sourcepub fn new(fct: FctColumn, validity: BitMask) -> Self
pub fn new(fct: FctColumn, validity: BitMask) -> Self
Construct from a FctColumn + validity bitmap.
Sourcepub fn encode_nullable(strings: &[Option<String>]) -> Result<Self, TidyError>
pub fn encode_nullable(strings: &[Option<String>]) -> Result<Self, TidyError>
Encode a string slice with optional null markers.
strings[i] = None → null row.
pub fn nrows(&self) -> usize
pub fn nlevels(&self) -> usize
pub fn is_null(&self, i: usize) -> bool
pub fn count_valid(&self) -> usize
Sourcepub fn fct_lump(&self, n: usize) -> Result<Self, TidyError>
pub fn fct_lump(&self, n: usize) -> Result<Self, TidyError>
fct_lump on non-null rows only. Null rows remain null.
Trait Implementations§
Source§impl Clone for NullableFactor
impl Clone for NullableFactor
Source§fn clone(&self) -> NullableFactor
fn clone(&self) -> NullableFactor
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 moreAuto Trait Implementations§
impl Freeze for NullableFactor
impl RefUnwindSafe for NullableFactor
impl Send for NullableFactor
impl Sync for NullableFactor
impl Unpin for NullableFactor
impl UnsafeUnpin for NullableFactor
impl UnwindSafe for NullableFactor
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
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>
Converts
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>
Converts
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