pub struct Partition { /* private fields */ }Implementations§
Source§impl Partition
impl Partition
pub fn new_unchecked(partition: Vec<HashSet<usize>>, lookup: Vec<usize>) -> Self
pub fn new_from_function<T: Clone + Eq + Hash>( n: usize, f: impl Fn(usize) -> T, ) -> (Self, Vec<T>)
pub fn project(&self, x: usize) -> usize
pub fn class_containing(&self, x: usize) -> &HashSet<usize>
pub fn get_class(&self, i: usize) -> &HashSet<usize>
pub fn num_elements(&self) -> usize
pub fn num_classes(&self) -> usize
pub fn size(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Partition
impl RefUnwindSafe for Partition
impl Send for Partition
impl Sync for Partition
impl Unpin for Partition
impl UnwindSafe for Partition
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more