pub struct BitSubMatrixMut<'a> { /* private fields */ }
Expand description
Mutable access to a range of matrix’s rows.
Implementations§
Source§impl<'a> BitSubMatrixMut<'a>
impl<'a> BitSubMatrixMut<'a>
Sourcepub fn new(slice: &mut [Block], row_bits: usize) -> BitSubMatrixMut<'_>
pub fn new(slice: &mut [Block], row_bits: usize) -> BitSubMatrixMut<'_>
Returns a new BitSubMatrixMut.
Sourcepub unsafe fn from_raw_parts(
ptr: *mut Block,
rows: usize,
row_bits: usize,
) -> Self
pub unsafe fn from_raw_parts( ptr: *mut Block, rows: usize, row_bits: usize, ) -> Self
Forms a BitSubMatrix from a pointer and dimensions.
Sourcepub fn sub_matrix(&self, range: Range<usize>) -> BitSubMatrix<'_>
pub fn sub_matrix(&self, range: Range<usize>) -> BitSubMatrix<'_>
Returns a slice of the matrix’s rows.
Sourcepub fn split_at(&self, row: usize) -> (BitSubMatrix<'_>, BitSubMatrix<'_>)
pub fn split_at(&self, row: usize) -> (BitSubMatrix<'_>, BitSubMatrix<'_>)
Given a row’s index, returns a slice of all rows above that row, a reference to said row, and a slice of all rows below.
Functionally equivalent to (self.sub_matrix(0..row), &self[row], self.sub_matrix(row..self.num_rows()))
.
Sourcepub fn split_at_mut(
&mut self,
row: usize,
) -> (BitSubMatrixMut<'_>, BitSubMatrixMut<'_>)
pub fn split_at_mut( &mut self, row: usize, ) -> (BitSubMatrixMut<'_>, BitSubMatrixMut<'_>)
Given a row’s index, returns a slice of all rows above that row, a reference to said row, and a slice of all rows below.
Sourcepub fn transitive_closure(&mut self)
pub fn transitive_closure(&mut self)
Computes the transitive closure of the binary relation represented by the matrix.
Uses the Warshall’s algorithm.
Sourcepub fn reflexive_closure(&mut self)
pub fn reflexive_closure(&mut self)
Computes the reflexive closure of the binary relation represented by the matrix.
Trait Implementations§
Source§impl<'a> Index<usize> for BitSubMatrixMut<'a>
Returns the matrix’s row in the form of a mutable slice.
impl<'a> Index<usize> for BitSubMatrixMut<'a>
Returns the matrix’s row in the form of a mutable slice.