Struct Symmetric2DMatrix
pub struct Symmetric2DMatrix { /* private fields */ }
Expand description
A matrix of boolean values, where matrix[x, y] == matrix[y, x]
Implementations§
§impl Symmetric2DMatrix
impl Symmetric2DMatrix
pub const fn new() -> Self
pub const fn new() -> Self
Creates an empty matrix.
pub fn set(&mut self, x: usize, y: usize) -> bool
pub fn set(&mut self, x: usize, y: usize) -> bool
Sets the value of the matrix at position (x, y)
to true.
Returns true if the value at (x, y) was changed, otherwise false.
pub fn iter_row_indices(&self, y: usize) -> impl Iterator<Item = usize> + '_
pub fn iter_row_indices(&self, y: usize) -> impl Iterator<Item = usize> + '_
Yields all indices x
where self.get(x, y)
is true.
pub fn raw_data(&self) -> &GrowingBitmap
pub fn raw_data(&self) -> &GrowingBitmap
Returns the backing bitmap.
Trait Implementations§
§impl Clone for Symmetric2DMatrix
impl Clone for Symmetric2DMatrix
§fn clone(&self) -> Symmetric2DMatrix
fn clone(&self) -> Symmetric2DMatrix
Returns a copy 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 more§impl Debug for Symmetric2DMatrix
impl Debug for Symmetric2DMatrix
§impl Default for Symmetric2DMatrix
impl Default for Symmetric2DMatrix
§fn default() -> Symmetric2DMatrix
fn default() -> Symmetric2DMatrix
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Symmetric2DMatrix
impl RefUnwindSafe for Symmetric2DMatrix
impl Send for Symmetric2DMatrix
impl Sync for Symmetric2DMatrix
impl Unpin for Symmetric2DMatrix
impl UnwindSafe for Symmetric2DMatrix
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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