pub struct Mask<const D: usize> { /* private fields */ }Implementations§
Source§impl Mask<1>
impl Mask<1>
pub fn get(&self, index: usize) -> bool
Sourcepub fn tile_in_place(&self, k: usize, output: &mut Mask<1>)
pub fn tile_in_place(&self, k: usize, output: &mut Mask<1>)
Copy the mask k-times into output
Sourcepub fn repeat_in_place(&self, k: usize, output: &mut Mask<1>)
pub fn repeat_in_place(&self, k: usize, output: &mut Mask<1>)
Repeat each element of the mask k-times and store the result in output
pub fn repeat_as_row_in_place(&self, k: usize, output: &mut Mask<2>)
pub fn repeat_as_column_in_place(&self, k: usize, output: &mut Mask<2>)
Source§impl<const D: usize> Mask<D>
impl<const D: usize> Mask<D>
pub fn zeros(shape: &[usize; D]) -> Self
pub fn copy(&mut self, other: &Mask<D>)
pub fn get_shape(&self) -> &[usize; D]
pub fn get_masks_mut(&mut self) -> MutableMasks<'_, D>
pub fn assert_invariants_satisfied(&self)
pub fn and(&self, other: &Self) -> Self
pub fn and_in_place(&mut self, other: &Self)
pub fn or(&self, other: &Self) -> Self
pub fn or_in_place(&mut self, other: &Self)
pub fn not(&self) -> Self
pub fn not_in_place(&mut self)
Trait Implementations§
Source§impl<'de, const D: usize> Deserialize<'de> for Mask<D>
impl<'de, const D: usize> Deserialize<'de> for Mask<D>
Source§fn deserialize<De>(deserializer: De) -> Result<Self, De::Error>where
De: Deserializer<'de>,
fn deserialize<De>(deserializer: De) -> Result<Self, De::Error>where
De: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<const D: usize> Freeze for Mask<D>
impl<const D: usize> RefUnwindSafe for Mask<D>
impl<const D: usize> Send for Mask<D>
impl<const D: usize> Sync for Mask<D>
impl<const D: usize> Unpin for Mask<D>
impl<const D: usize> UnwindSafe for Mask<D>
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