pub struct Mask { /* private fields */ }
Expand description
A helper struct for masking/unmasking values in a vec.
Implementations§
source§impl Mask
impl Mask
sourcepub fn unmask(&self, inp: &[f64], fill_value: f64) -> Vec<f64, Global> ⓘ
pub fn unmask(&self, inp: &[f64], fill_value: f64) -> Vec<f64, Global> ⓘ
Recover the masked missing values with fill_value
sourcepub fn apply<T>(&self, out: &[T]) -> Vec<T, Global> ⓘwhere
T: Copy,
pub fn apply<T>(&self, out: &[T]) -> Vec<T, Global> ⓘwhere
T: Copy,
Return a vec with masked values removed.
Trait Implementations§
source§impl FromIterator<bool> for Mask
impl FromIterator<bool> for Mask
source§impl IntoIterator for Mask
impl IntoIterator for Mask
Auto Trait Implementations§
impl RefUnwindSafe for Mask
impl Send for Mask
impl Sync for Mask
impl Unpin for Mask
impl UnwindSafe for Mask
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.