[−][src]Struct bit_matrix::submatrix::BitSubMatrixMut
Mutable access to a range of matrix's rows.
Methods
impl<'a> BitSubMatrixMut<'a>
[src]
pub fn new(slice: &mut [Block], row_bits: usize) -> BitSubMatrixMut
[src]
Returns a new BitSubMatrixMut.
pub unsafe fn from_raw_parts(
ptr: *mut Block,
rows: usize,
row_bits: usize
) -> Self
[src]
ptr: *mut Block,
rows: usize,
row_bits: usize
) -> Self
Forms a BitSubMatrix from a pointer and dimensions.
pub fn set(&mut self, row: usize, col: usize, enabled: bool)
[src]
pub fn sub_matrix(&self, range: Range<usize>) -> BitSubMatrix
[src]
Returns a slice of the matrix's rows.
pub fn split_at(
&self,
row: usize
) -> (BitSubMatrix, &BitVecSlice, BitSubMatrixMut)
[src]
&self,
row: usize
) -> (BitSubMatrix, &BitVecSlice, 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.
Functionally equivalent to (self.sub_matrix(0..row), &self[row], self.sub_matrix(row..self.num_rows()))
.
pub fn split_at_mut(
&mut self,
row: usize
) -> (BitSubMatrixMut, &mut BitVecSlice, BitSubMatrixMut)
[src]
&mut self,
row: usize
) -> (BitSubMatrixMut, &mut BitVecSlice, 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.
pub fn transitive_closure(&mut self)
[src]
Computes the transitive closure of the binary relation represented by the matrix.
Uses the Warshall's algorithm.
pub fn reflexive_closure(&mut self)
[src]
Computes the reflexive closure of the binary relation represented by the matrix.
pub fn iter_mut(
&mut self
) -> Map<ChunksMut<Block>, fn(_: &mut [Block]) -> &mut BitVecSlice>
[src]
&mut self
) -> Map<ChunksMut<Block>, fn(_: &mut [Block]) -> &mut BitVecSlice>
Iterates over the matrix's rows in the form of mutable slices.
Trait Implementations
impl<'a> Index<usize> for BitSubMatrixMut<'a>
[src]
Returns the matrix's row in the form of a mutable slice.
type Output = BitVecSlice
The returned type after indexing.
fn index(&self, row: usize) -> &BitVecSlice
[src]
impl<'a> IndexMut<usize> for BitSubMatrixMut<'a>
[src]
Returns the matrix's row in the form of a mutable slice.
fn index_mut(&mut self, row: usize) -> &mut BitVecSlice
[src]
Auto Trait Implementations
impl<'a> Unpin for BitSubMatrixMut<'a>
impl<'a> Send for BitSubMatrixMut<'a>
impl<'a> Sync for BitSubMatrixMut<'a>
impl<'a> !UnwindSafe for BitSubMatrixMut<'a>
impl<'a> RefUnwindSafe for BitSubMatrixMut<'a>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,