Struct rustc_data_structures::bitvec::BitMatrix
[−]
[src]
pub struct BitMatrix { /* fields omitted */ }rustc_private)A "bit matrix" is basically a matrix of booleans represented as
one gigantic bitvector. In other words, it is as if you have
rows bitvectors, each of length columns.
Methods
impl BitMatrix[src]
fn new(rows: usize, columns: usize) -> BitMatrix
rustc_private)fn add(&mut self, source: usize, target: usize) -> bool
rustc_private)fn contains(&self, source: usize, target: usize) -> bool
rustc_private)Do the bits from source contain target?
Put another way, if the matrix represents (transitive)
reachability, can source reach target?
fn intersection(&self, a: usize, b: usize) -> Vec<usize>
rustc_private)Returns those indices that are reachable from both a and
b. This is an O(n) operation where n is the number of
elements (somewhat independent from the actual size of the
intersection, in particular).
fn merge(&mut self, read: usize, write: usize) -> bool
rustc_private)Add the bits from read to the bits from 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).
fn iter<'a>(&'a self, row: usize) -> BitVectorIter<'a>
rustc_private)Trait Implementations
impl Clone for BitMatrix[src]
fn clone(&self) -> BitMatrix
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more