Type Alias BorrowsDomain

Source
type BorrowsDomain = DenseBitSet<BorrowIndex>;

Aliased Type§

struct BorrowsDomain { /* 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<T> DenseBitSet<T>

Source

pub fn domain_size(&self) -> usize

Gets the domain size.

Source§

impl<T> DenseBitSet<T>
where T: Idx,

Source

pub fn new_empty(domain_size: usize) -> DenseBitSet<T>

Creates a new, empty bitset with a given domain_size.

Source

pub fn new_filled(domain_size: usize) -> DenseBitSet<T>

Creates a new, filled bitset with a given domain_size.

Source

pub fn clear(&mut self)

Clear all elements.

Source

pub fn count(&self) -> usize

Count the number of set bits in the set.

Source

pub fn contains(&self, elem: T) -> bool

Returns true if self contains elem.

Source

pub fn superset(&self, other: &DenseBitSet<T>) -> bool

Is self is a (non-strict) superset of other?

Source

pub fn is_empty(&self) -> bool

Is the set empty?

Source

pub fn insert(&mut self, elem: T) -> bool

Insert elem. Returns whether the set has changed.

Source

pub fn insert_range(&mut self, elems: impl RangeBounds<T>)

Source

pub fn insert_all(&mut self)

Sets all bits to true.

Source

pub fn remove(&mut self, elem: T) -> bool

Returns true if the set has changed.

Source

pub fn iter(&self) -> BitIter<'_, T>

Iterates over the indices of set bits in a sorted order.

Source

pub fn last_set_in(&self, range: impl RangeBounds<T>) -> Option<T>

Source

pub fn union<Rhs>(&mut self, other: &Rhs) -> bool
where DenseBitSet<T>: BitRelations<Rhs>,

Sets self = self | other and returns true if self changed (i.e., if new bits were added).

Source

pub fn subtract<Rhs>(&mut self, other: &Rhs) -> bool
where DenseBitSet<T>: BitRelations<Rhs>,

Sets self = self - other and returns true if self changed. (i.e., if any bits were removed).

Source

pub fn intersect<Rhs>(&mut self, other: &Rhs) -> bool
where DenseBitSet<T>: BitRelations<Rhs>,

Sets self = self & other and return true if self changed. (i.e., if any bits were removed).

Source

pub fn union_not(&mut self, other: &DenseBitSet<T>)

Sets self = self | !other.

FIXME: Incorporate this into BitRelations and fill out implementations for other bitset types, if needed.

Trait Implementations

Source§

impl<T> BitRelations<ChunkedBitSet<T>> for DenseBitSet<T>
where T: Idx,

Source§

fn union(&mut self, other: &ChunkedBitSet<T>) -> bool

Source§

fn subtract(&mut self, _other: &ChunkedBitSet<T>) -> bool

Source§

fn intersect(&mut self, other: &ChunkedBitSet<T>) -> bool

Source§

impl<T> BitRelations<DenseBitSet<T>> for DenseBitSet<T>
where T: Idx,

Source§

fn union(&mut self, other: &DenseBitSet<T>) -> bool

Source§

fn subtract(&mut self, other: &DenseBitSet<T>) -> bool

Source§

fn intersect(&mut self, other: &DenseBitSet<T>) -> bool

Source§

impl<T> Clone for DenseBitSet<T>

Source§

fn clone(&self) -> DenseBitSet<T>

Returns a copy of the value. Read more
Source§

fn clone_from(&mut self, from: &DenseBitSet<T>)

Performs copy-assignment from source. Read more
Source§

impl<T> Debug for DenseBitSet<T>
where T: Idx,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<T, C> DebugWithContext<C> for DenseBitSet<T>
where T: Idx + DebugWithContext<C>,

Source§

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

Source§

fn fmt_diff_with( &self, old: &DenseBitSet<T>, ctxt: &C, f: &mut Formatter<'_>, ) -> Result<(), Error>

Print the difference between self and old. Read more
Source§

impl<T, __D> Decodable<__D> for DenseBitSet<T>
where __D: Decoder, PhantomData<T>: Decodable<__D>,

Source§

fn decode(__decoder: &mut __D) -> DenseBitSet<T>

Source§

impl<T, __E> Encodable<__E> for DenseBitSet<T>
where __E: Encoder, PhantomData<T>: Encodable<__E>,

Source§

fn encode(&self, __encoder: &mut __E)

Source§

impl<T> From<GrowableBitSet<T>> for DenseBitSet<T>
where T: Idx,

Source§

fn from(bit_set: GrowableBitSet<T>) -> DenseBitSet<T>

Converts to this type from the input type.
Source§

impl<T> GenKill<T> for DenseBitSet<T>
where T: Idx,

Source§

fn gen_(&mut self, elem: T)

Inserts elem into the state vector.
Source§

fn kill(&mut self, elem: T)

Removes elem from the state vector.
Source§

fn gen_all(&mut self, elems: impl IntoIterator<Item = T>)

Calls gen for each element in elems.
Source§

fn kill_all(&mut self, elems: impl IntoIterator<Item = T>)

Calls kill for each element in elems.
Source§

impl<T> Hash for DenseBitSet<T>
where T: Hash,

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<I, CTX> HashStable<CTX> for DenseBitSet<I>
where I: Idx,

Source§

fn hash_stable(&self, _ctx: &mut CTX, hasher: &mut StableHasher<SipHasher128>)

Source§

impl<T> JoinSemiLattice for DenseBitSet<T>
where T: Idx,

A DenseBitSet represents the lattice formed by the powerset of all possible values of the index type T ordered by inclusion. Equivalently, it is a tuple of “two-point” lattices, one for each possible value of T.

Source§

fn join(&mut self, other: &DenseBitSet<T>) -> bool

Computes the least upper bound of two elements, storing the result in self and returning true if self has changed. Read more
Source§

impl<T> PartialEq for DenseBitSet<T>
where T: PartialEq,

Source§

fn eq(&self, other: &DenseBitSet<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> ToString for DenseBitSet<T>
where T: Idx,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> Eq for DenseBitSet<T>
where T: Eq,

Source§

impl<T> StructuralPartialEq for DenseBitSet<T>