Struct bit_matrix::matrix::BitMatrix [−][src]
pub struct BitMatrix { /* fields omitted */ }
Expand description
A matrix of bits.
Implementations
Create a new BitMatrix with specific numbers of bits in columns and rows.
Grows the matrix in-place, adding num_rows
rows filled with value
.
Returns a slice of the matrix’s rows.
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<'_>)
pub 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.
Iterate over bits in the specified row.
Computes the transitive closure of the binary relation represented by the matrix.
Uses the Warshall’s algorithm.
Computes the reflexive closure of the binary relation represented by the matrix.
Trait Implementations
Returns true
if a bit is enabled in the matrix, or false
otherwise.
Returns the matrix’s row in the form of an immutable slice.
type Output = BitVecSlice
type Output = BitVecSlice
The returned type after indexing.
Performs the indexing (container[index]
) operation. Read more
Returns the matrix’s row in the form of a mutable slice.
Performs the mutable indexing (container[index]
) operation. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for BitMatrix
impl UnwindSafe for BitMatrix
Blanket Implementations
Mutably borrows from an owned value. Read more