Type Alias LiveLoans

Source
pub(crate) type LiveLoans = SparseBitMatrix<PointIndex, BorrowIndex>;

Aliased Type§

struct LiveLoans { /* private fields */ }

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 32 bytes

Implementations

Source§

impl<R, C> SparseBitMatrix<R, C>
where R: Idx, C: Idx,

Source

pub fn new(num_columns: usize) -> SparseBitMatrix<R, C>

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

Source

pub fn insert(&mut self, row: R, column: C) -> bool

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.

Source

pub fn remove(&mut self, row: R, column: C) -> bool

Sets the cell at (row, column) to false. Put another way, delete column from the bitset for row. Has no effect if row does not exist.

Returns true if this changed the matrix.

Source

pub fn clear(&mut self, row: R)

Sets all columns at row to false. Has no effect if row does not exist.

Source

pub fn contains(&self, row: R, column: C) -> bool

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?

Source

pub fn union_rows(&mut self, read: R, write: R) -> bool

Adds the bits from row read to the bits from row write, and returns 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).

Source

pub fn insert_all_into_row(&mut self, row: R)

Insert all bits in the given row.

Source

pub fn rows(&self) -> impl Iterator<Item = R>

Source

pub fn iter(&self, row: R) -> impl Iterator<Item = C>

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

Source

pub fn row(&self, row: R) -> Option<&DenseBitSet<C>>

Source

pub fn intersect_row<Set>(&mut self, row: R, set: &Set) -> bool
where DenseBitSet<C>: BitRelations<Set>,

Intersects row with set. set can be either DenseBitSet or ChunkedBitSet. Has no effect if row does not exist.

Returns true if the row was changed.

Source

pub fn subtract_row<Set>(&mut self, row: R, set: &Set) -> bool
where DenseBitSet<C>: BitRelations<Set>,

Subtracts set from row. set can be either DenseBitSet or ChunkedBitSet. Has no effect if row does not exist.

Returns true if the row was changed.

Source

pub fn union_row<Set>(&mut self, row: R, set: &Set) -> bool
where DenseBitSet<C>: BitRelations<Set>,

Unions row with set. set can be either DenseBitSet or ChunkedBitSet.

Returns true if the row was changed.

Trait Implementations

Source§

impl<R, C> Clone for SparseBitMatrix<R, C>
where R: Clone + Idx, C: Clone + Idx,

Source§

fn clone(&self) -> SparseBitMatrix<R, C>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<R, C> Debug for SparseBitMatrix<R, C>
where R: Debug + Idx, C: Debug + Idx,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more