pub struct Coloring<S: Set + ?Sized> { /* private fields */ }
Expand description
Coloring.
A coloring for the set S
is a list (W_1, W_2, ..., W_m)
such
that { W_1, W_2, ..., W_m }
is a coloring of S
.
Each W_i
is called a cell of the coloring.
Implementations§
Source§impl<S: Set + ?Sized> Coloring<S>
impl<S: Set + ?Sized> Coloring<S>
Sourcepub fn from_map<C: Ord>(set: &S, map: &S::Map<C>) -> Self
pub fn from_map<C: Ord>(set: &S, map: &S::Map<C>) -> Self
Creates a new coloring from a map associating each item to an initial
color of type C
.
pub fn color_index_of(&self, item: &S::Item) -> Option<usize>
pub fn colors(&self) -> Colors<'_, S>
pub fn is_empty(&self) -> bool
pub fn is_discrete(&self) -> bool
pub fn color_start(&self, i: usize) -> Option<usize>
Trait Implementations§
impl<S: Set + ?Sized> Eq for Coloring<S>
Auto Trait Implementations§
impl<S> Freeze for Coloring<S>where
S: ?Sized,
impl<S> RefUnwindSafe for Coloring<S>
impl<S> Send for Coloring<S>
impl<S> Sync for Coloring<S>
impl<S> Unpin for Coloring<S>
impl<S> UnwindSafe for Coloring<S>
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