pub struct SymbolBitMatrix { /* private fields */ }
Implementations§
Source§impl SymbolBitMatrix
impl SymbolBitMatrix
pub fn iter_row_syms(&self, row: Symbol) -> impl Iterator<Item = Symbol> + '_
Methods from Deref<Target = BitMatrix>§
Sourcepub fn grow(&mut self, num_rows: usize, value: bool)
pub fn grow(&mut self, num_rows: usize, value: bool)
Grows the matrix in-place, adding num_rows
rows filled with value
.
Sourcepub fn sub_matrix<R>(&self, range: R) -> BitSubMatrix<'_>where
R: RangeBounds<usize>,
pub fn sub_matrix<R>(&self, range: R) -> BitSubMatrix<'_>where
R: RangeBounds<usize>,
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 Debug for SymbolBitMatrix
impl Debug for SymbolBitMatrix
Source§impl Deref for SymbolBitMatrix
impl Deref for SymbolBitMatrix
Source§impl DerefMut for SymbolBitMatrix
impl DerefMut for SymbolBitMatrix
Source§impl From<DirectDerivationMatrix> for SymbolBitMatrix
impl From<DirectDerivationMatrix> for SymbolBitMatrix
Source§fn from(value: DirectDerivationMatrix) -> Self
fn from(value: DirectDerivationMatrix) -> Self
Converts to this type from the input type.
Source§impl From<ReachabilityMatrix> for SymbolBitMatrix
impl From<ReachabilityMatrix> for SymbolBitMatrix
Source§fn from(value: ReachabilityMatrix) -> Self
fn from(value: ReachabilityMatrix) -> Self
Converts to this type from the input type.
Source§impl From<SymbolBitMatrix> for BitMatrix
impl From<SymbolBitMatrix> for BitMatrix
Source§fn from(value: SymbolBitMatrix) -> Self
fn from(value: SymbolBitMatrix) -> Self
Converts to this type from the input type.
Source§impl From<UnitDerivationMatrix> for SymbolBitMatrix
impl From<UnitDerivationMatrix> for SymbolBitMatrix
Source§fn from(value: UnitDerivationMatrix) -> Self
fn from(value: UnitDerivationMatrix) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SymbolBitMatrix
impl RefUnwindSafe for SymbolBitMatrix
impl Send for SymbolBitMatrix
impl Sync for SymbolBitMatrix
impl Unpin for SymbolBitMatrix
impl UnwindSafe for SymbolBitMatrix
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more