[][src]Struct bit_matrix::submatrix::BitSubMatrixMut

pub struct BitSubMatrixMut<'a> { /* fields omitted */ }

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]

Forms a BitSubMatrix from a pointer and dimensions.

pub fn set(&mut self, row: usize, col: usize, enabled: bool)[src]

Sets the value of a bit.

Panics

Panics if (row, col) is out of bounds.

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]

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]

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]

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.

impl<'a> IndexMut<usize> for BitSubMatrixMut<'a>[src]

Returns the matrix's row in the form of a mutable slice.

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]