pub struct Subset { /* private fields */ }
Expand description
A data structure representing sets of integers. The user instantiates subsets through Partition.
Implementations§
Source§impl Subset
impl Subset
pub fn new() -> Subset
pub fn add(&mut self, i: usize) -> bool
pub fn intersection_count(&self, other: &Subset) -> usize
pub fn intersection(&self, other: &Subset) -> Subset
pub fn contains(&self, i: usize) -> bool
Sourcepub fn items_via_copying(&self) -> Vec<usize>
pub fn items_via_copying(&self) -> Vec<usize>
A copy of the elements of the set.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Subset
impl RefUnwindSafe for Subset
impl Send for Subset
impl Sync for Subset
impl Unpin for Subset
impl UnwindSafe for Subset
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