Struct rustc_data_structures::bitvec::SparseBitMatrix [−][src]
pub struct SparseBitMatrix<R, C> where
R: Idx,
C: Idx, { columns: usize, vector: IndexVec<R, BitVector<C>>, }
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
A moderately sparse bit matrix: rows are appended lazily, but columns within appended rows are instantiated fully upon creation.
Fields
columns: usize
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
vector: IndexVec<R, BitVector<C>>
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Methods
impl<R: Idx, C: Idx> SparseBitMatrix<R, C>[src]
impl<R: Idx, C: Idx> SparseBitMatrix<R, C>pub fn new(columns: usize) -> Self[src]
pub fn new(columns: usize) -> Self🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Create a new empty sparse bit matrix with no rows or columns.
fn ensure_row(&mut self, row: R)[src]
fn ensure_row(&mut self, row: R)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn add(&mut self, row: R, column: C) -> bool[src]
pub fn add(&mut self, row: R, column: C) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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.
pub fn contains(&self, row: R, column: C) -> bool[src]
pub fn contains(&self, row: R, column: C) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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?
pub fn merge(&mut self, read: R, write: R) -> bool[src]
pub fn merge(&mut self, read: R, write: R) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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).
pub fn merge_into(&mut self, into: R, from: &BitVector<C>) -> bool[src]
pub fn merge_into(&mut self, into: R, from: &BitVector<C>) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Merge a row, from, into the into row.
pub fn add_all(&mut self, row: R)[src]
pub fn add_all(&mut self, row: R)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Add all bits to the given row.
pub fn len(&self) -> usize[src]
pub fn len(&self) -> usize🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Number of elements in the matrix.
pub fn rows(&self) -> [src]
pub fn rows(&self) -> 🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn iter<'a>(&'a self, row: R) -> <'a>[src]
pub fn iter<'a>(&'a self, row: R) -> <'a>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Iterates through all the columns set to true in a given row of the matrix.
pub fn iter_enumerated<'a>(&'a self) -> <'a>[src]
pub fn iter_enumerated<'a>(&'a self) -> <'a>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Iterates through each row and the accompanying bit set.
pub fn row(&self, row: R) -> Option<&BitVector<C>>[src]
pub fn row(&self, row: R) -> Option<&BitVector<C>>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Trait Implementations
impl<R: Clone, C: Clone> Clone for SparseBitMatrix<R, C> where
R: Idx,
C: Idx, [src]
impl<R: Clone, C: Clone> Clone for SparseBitMatrix<R, C> where
R: Idx,
C: Idx, fn clone(&self) -> SparseBitMatrix<R, C>[src]
fn clone(&self) -> SparseBitMatrix<R, C>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<R: Debug, C: Debug> Debug for SparseBitMatrix<R, C> where
R: Idx,
C: Idx, [src]
impl<R: Debug, C: Debug> Debug for SparseBitMatrix<R, C> where
R: Idx,
C: Idx, Auto Trait Implementations
impl<R, C> Send for SparseBitMatrix<R, C> where
C: Send,
impl<R, C> Send for SparseBitMatrix<R, C> where
C: Send, impl<R, C> Sync for SparseBitMatrix<R, C> where
C: Sync,
impl<R, C> Sync for SparseBitMatrix<R, C> where
C: Sync,