Struct rustc_data_structures::bitvec::SparseBitMatrix[][src]

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

A moderately sparse bit matrix, in which rows are instantiated lazily.

Initially, every row has no explicit representation. If any bit within a row is set, the entire row is instantiated as Some(<full-column-width-BitArray>). 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.

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).

Merge a row, from, into the into row.

Add all bits to 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]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Formats the value using the given formatter. Read more

Auto Trait Implementations

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

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