Type Alias indexical::impls::RustcArcIndexMatrix
source · pub type RustcArcIndexMatrix<R, C> = IndexMatrix<R, C, BitSet<usize>, ArcFamily>;
Expand description
IndexMatrix
specialized to the rustc_index::bit_set::BitSet
implementation with the ArcFamily
.
Aliased Type§
struct RustcArcIndexMatrix<R, C> { /* private fields */ }
Implementations
source§impl<R, C, S, P> IndexMatrix<R, C, S, P>
impl<R, C, S, P> IndexMatrix<R, C, S, P>
sourcepub fn new(col_domain: &P::Pointer<IndexedDomain<C>>) -> Self
pub fn new(col_domain: &P::Pointer<IndexedDomain<C>>) -> Self
Creates an empty matrix.
sourcepub fn insert<M>(&mut self, row: R, col: impl ToIndex<C, M>) -> bool
pub fn insert<M>(&mut self, row: R, col: impl ToIndex<C, M>) -> bool
Inserts a pair (row, col)
into the matrix, returning true if self
changed.
sourcepub fn union_into_row(&mut self, into: R, from: &IndexSet<C, S, P>) -> bool
pub fn union_into_row(&mut self, into: R, from: &IndexSet<C, S, P>) -> bool
Adds all elements of from
into the row into
.
sourcepub fn union_rows(&mut self, from: R, to: R) -> bool
pub fn union_rows(&mut self, from: R, to: R) -> bool
Adds all elements from the row from
into the row into
.
sourcepub fn row(&self, row: &R) -> impl Iterator<Item = &C> + '_
pub fn row(&self, row: &R) -> impl Iterator<Item = &C> + '_
Returns an iterator over the elements in row
.
sourcepub fn rows(&self) -> impl Iterator<Item = (&R, &IndexSet<C, S, P>)> + '_
pub fn rows(&self) -> impl Iterator<Item = (&R, &IndexSet<C, S, P>)> + '_
Returns an iterator over all rows in the matrix.
sourcepub fn row_set(&self, row: &R) -> &IndexSet<C, S, P>
pub fn row_set(&self, row: &R) -> &IndexSet<C, S, P>
Returns the IndexSet
for a particular row
.
sourcepub fn col_domain(&self) -> &P::Pointer<IndexedDomain<C>>
pub fn col_domain(&self) -> &P::Pointer<IndexedDomain<C>>
Returns the IndexedDomain
for the column type.