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>
where R: PartialEq + Eq + Hash + Clone, C: IndexedValue, S: BitSet, P: PointerFamily,

source

pub fn new(col_domain: &P::Pointer<IndexedDomain<C>>) -> Self

Creates an empty matrix.

source

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.

source

pub fn union_into_row(&mut self, into: R, from: &IndexSet<C, S, P>) -> bool

Adds all elements of from into the row into.

source

pub fn union_rows(&mut self, from: R, to: R) -> bool

Adds all elements from the row from into the row into.

source

pub fn row(&self, row: &R) -> impl Iterator<Item = &C> + '_

Returns an iterator over the elements in row.

source

pub fn rows(&self) -> impl Iterator<Item = (&R, &IndexSet<C, S, P>)> + '_

Returns an iterator over all rows in the matrix.

source

pub fn row_set(&self, row: &R) -> &IndexSet<C, S, P>

Returns the IndexSet for a particular row.

source

pub fn clear_row(&mut self, row: &R)

Clears all the elements from the row.

source

pub fn col_domain(&self) -> &P::Pointer<IndexedDomain<C>>

Returns the IndexedDomain for the column type.

Trait Implementations

source§

impl<R, C, S, P> Debug for IndexMatrix<R, C, S, P>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<R, C, S, P> JoinSemiLattice for IndexMatrix<R, C, S, P>
where R: PartialEq + Eq + Hash + Clone, C: IndexedValue, S: BitSet, P: PointerFamily,

source§

fn join(&mut self, other: &Self) -> bool

Computes the least upper bound of two elements, storing the result in self and returning true if self has changed. Read more
source§

impl<R, C, S, P> Eq for IndexMatrix<R, C, S, P>
where R: PartialEq + Eq + Hash, C: IndexedValue, S: BitSet, P: PointerFamily,

source§

impl<R, C, S, P> Clone for IndexMatrix<R, C, S, P>
where R: PartialEq + Eq + Hash + Clone, C: IndexedValue, S: BitSet, P: PointerFamily,

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<R, C, S, P> PartialEq for IndexMatrix<R, C, S, P>
where R: PartialEq + Eq + Hash, C: IndexedValue, S: BitSet, P: PointerFamily,

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.