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

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

Mutable access to a range of matrix's rows.

Methods

impl<'a> BitSubMatrixMut<'a>
[src]

fn new(slice: &mut [Block], row_bits: usize) -> BitSubMatrixMut

Returns a new BitSubMatrixMut.

unsafe fn from_raw_parts(ptr: *mut Block, rows: usize, row_bits: usize) -> Self

Forms a BitSubMatrix from a pointer and dimensions.

fn set(&mut self, row: usize, col: usize, enabled: bool)

Sets the value of a bit.

Panics

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

fn sub_matrix(&self, range: Range<usize>) -> BitSubMatrix

Returns a slice of the matrix's rows.

fn split_at(&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())).

fn split_at_mut(&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.

fn transitive_closure(&mut self)

Computes the transitive closure of the binary relation represented by the matrix.

Uses the Warshall's algorithm.

fn iter_mut(&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

The method for the indexing (Foo[Bar]) operation

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

The method for the indexing (Foo[Bar]) operation