[−][src]Struct rustc_data_structures::bitvec::SparseBitMatrix
🔬 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, 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.
Fields
num_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?
rows: IndexVec<R, Option<BitArray<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(num_columns: usize) -> Self
[src]
pub fn new(num_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) -> &mut BitArray<C>
[src]
fn ensure_row(&mut self, row: R) -> &mut BitArray<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?
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: &BitArray<C>) -> bool
[src]
pub fn merge_into(&mut self, into: R, from: &BitArray<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 rows(
&self
) -> impl Iterator<Item = R>
[src]
pub fn rows(
&self
) -> impl Iterator<Item = 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 iter<'a>(
&'a self,
row: R
) -> impl Iterator<Item = C> + 'a
[src]
pub fn iter<'a>(
&'a self,
row: R
) -> impl Iterator<Item = C> + '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 row(&self, row: R) -> Option<&BitArray<C>>
[src]
pub fn row(&self, row: R) -> Option<&BitArray<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,
Blanket Implementations
impl<T> Erased for T
[src]
impl<T> Erased for T
impl<T> Send for T where
T: ?Sized,
[src]
impl<T> Send for T where
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
impl<T> Sync for T where
T: ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T
[src]
fn borrow(&self) -> &T
Immutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<E> SpecializationError for E
[src]
impl<E> SpecializationError for E
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
[src]
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
🔬 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 an error for a missing method specialization. Defaults to panicking with type, trait & method names. S
is the encoder/decoder state type, T
is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more
impl<T> Erased for T
impl<T> Erased for T