[][src]Struct rustc_data_structures::bit_set::SparseBitMatrix

pub struct SparseBitMatrix<R, C> where
    R: Idx,
    C: Idx
{ /* fields omitted */ }

A fixed-column-size, variable-row-size 2D bit matrix with a moderately sparse representation.

Initially, every row has no explicit representation. If any bit within a row is set, the entire row is instantiated as Some(<HybridBitSet>). Furthermore, any previously uninstantiated rows prior to it will be instantiated as None. Those prior rows may themselves become fully instantiated later on if any of their bits are set.

R and C are index types used to identify rows and columns respectively; typically newtyped usize wrappers, but they can also just be usize.

Methods

impl<R: Idx, C: Idx> SparseBitMatrix<R, C>
[src]

Create a new empty sparse bit matrix with no rows or columns.

Sets the cell at (row, column) to true. Put another way, insert column to the bitset for row.

Returns true if this changed the matrix, and false otherwise.

Do the bits from row contain column? Put another way, is the matrix cell at (row, column) true? Put yet another way, if the matrix represents (transitive) reachability, can row reach column?

Add the bits from row read to the bits from row write, return true if anything changed.

This is used when computing transitive reachability because if you have an edge write -> read, because in that case write can reach everything that read can (and potentially more).

Union a row, from, into the into row.

Insert all bits in the given row.

Iterates through all the columns set to true in a given row of the matrix.

Trait Implementations

impl<R: Clone, C: Clone> Clone for SparseBitMatrix<R, C> where
    R: Idx,
    C: Idx
[src]

Performs copy-assignment from source. Read more

impl<R: Debug, C: Debug> Debug for SparseBitMatrix<R, C> where
    R: Idx,
    C: Idx
[src]

Auto Trait Implementations

impl<R, C> !Send for SparseBitMatrix<R, C>

impl<R, C> Sync for SparseBitMatrix<R, C> where
    C: Sync

Blanket Implementations

impl<T> Erased for T
[src]

impl<T> Send for T where
    T: ?Sized
[src]

impl<T> Sync for T where
    T: ?Sized
[src]

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<E> SpecializationError for E
[src]

impl<T> Erased for T

impl<E> SpecializationError for E
[src]

impl<T> Erased for T
[src]

impl<T> Send for T where
    T: ?Sized
[src]

impl<T> Sync for T where
    T: ?Sized
[src]

impl<T> Erased for T