pub trait BitArray: Sized + BitAnd<Output = Self> + BitOr<Output = Self> + BitXor<Output = Self> + Not<Output = Self> + Copy {
const LEN: usize;
// Required methods
fn splat(s: bool) -> Self;
fn get_bit(self, index: usize) -> bool;
fn set_bit(&mut self, index: usize, sign: bool);
fn count_ones(self) -> u32;
fn transpose_in_place(a: &mut BitMatrix<Self, { Self::LEN }>);
}
Expand description
Things we can do to an array of bits.
Required Associated Constants§
Required Methods§
sourcefn get_bit(self, index: usize) -> bool
fn get_bit(self, index: usize) -> bool
Get a bit. Poor performance, used only for testing and debugging.
sourcefn set_bit(&mut self, index: usize, sign: bool)
fn set_bit(&mut self, index: usize, sign: bool)
Set a bit. Poor performance, used only for testing and debugging.
fn count_ones(self) -> u32
sourcefn transpose_in_place(a: &mut BitMatrix<Self, { Self::LEN }>)
fn transpose_in_place(a: &mut BitMatrix<Self, { Self::LEN }>)
Transpose a square matrix in place. This will likely be better performance than using Transpose::transpose()
.
Object Safety§
This trait is not object safe.