pub struct BitSet(/* private fields */);Expand description
A bitset for efficient subset representation.
Implementations§
Source§impl BitSet
impl BitSet
Sourcepub fn from_iter(iter: impl Iterator<Item = usize>) -> Self
pub fn from_iter(iter: impl Iterator<Item = usize>) -> Self
Creates a bitset from an iterator of indices.
Sourcepub fn intersection(self, other: Self) -> Self
pub fn intersection(self, other: Self) -> Self
Returns the intersection of two sets.
Sourcepub fn difference(self, other: Self) -> Self
pub fn difference(self, other: Self) -> Self
Returns the difference (self - other).
Sourcepub fn is_subset_of(self, other: Self) -> bool
pub fn is_subset_of(self, other: Self) -> bool
Checks if this set is a subset of another.
Sourcepub fn subsets(self) -> SubsetIterator ⓘ
pub fn subsets(self) -> SubsetIterator ⓘ
Iterates over all non-empty subsets.
Trait Implementations§
impl Copy for BitSet
impl Eq for BitSet
impl StructuralPartialEq for BitSet
Auto Trait Implementations§
impl Freeze for BitSet
impl RefUnwindSafe for BitSet
impl Send for BitSet
impl Sync for BitSet
impl Unpin for BitSet
impl UnwindSafe for BitSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.