[][src]Struct jp_partition::Partition

pub struct Partition<T: Copy + Ord> { /* fields omitted */ }

Methods

impl<T: Copy + Ord> Partition<T>[src]

pub fn new() -> Partition<T>[src]

pub fn insert(&mut self, elt: T)[src]

Panics if the new element already exists.

pub fn is_rep(&self, elt: &T) -> bool[src]

Is the given element the representative of its component?

pub fn merge(&mut self, elt1: T, elt2: T) -> bool[src]

Returns true if there was a merge to be done (i.e. they didn't already belong to the same part).

pub fn representative_mut(&mut self, elt: T) -> T[src]

pub fn representative(&self, elt: T) -> T[src]

pub fn same_part_mut(&mut self, elt1: T, elt2: T) -> bool[src]

pub fn same_part(&self, elt1: T, elt2: T) -> bool[src]

pub fn contains(&self, elt: T) -> bool[src]

pub fn remove_part(&mut self, elt: T)[src]

pub fn iter_part<'a>(
    &'a self,
    elt: T
) -> impl Iterator<Item = T> + 'a
[src]

pub fn iter_parts<'a>(
    &'a self
) -> impl Iterator<Item = impl Iterator<Item = T> + 'a> + 'a
[src]

Trait Implementations

impl<T: Copy + Ord> Default for Partition<T>[src]

impl<T: Clone + Copy + Ord> Clone for Partition<T>[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<T: Debug + Copy + Ord> Debug for Partition<T>[src]

impl<T: Copy + Ord, PI: IntoIterator<Item = T>> FromIterator<PI> for Partition<T>[src]

impl<'de, T: Copy + Ord> Deserialize<'de> for Partition<T> where
    T: Deserialize<'de>, 
[src]

impl<T: Copy + Ord> Serialize for Partition<T> where
    T: Serialize
[src]

Auto Trait Implementations

impl<T> Send for Partition<T> where
    T: Send

impl<T> Sync for Partition<T> where
    T: Sync

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]