Struct union_find::QuickFindUf
[−]
[src]
pub struct QuickFindUf<V> { /* fields omitted */ }
Union-Find implementation with quick find operation.
Trait Implementations
impl<V: Debug> Debug for QuickFindUf<V>
[src]
impl<V> Clone for QuickFindUf<V> where
V: Clone + Union,
[src]
V: Clone + Union,
fn clone(&self) -> QuickFindUf<V>
Returns a copy of the value. Read more
fn clone_from(&mut self, other: &QuickFindUf<V>)
Performs copy-assignment from source
. Read more
impl<V: Union> UnionFind<V> for QuickFindUf<V>
[src]
fn size(&self) -> usize
Returns the size of self
.
fn insert(&mut self, data: V) -> usize
Inserts a new set into the union. Read more
fn union(&mut self, key0: usize, key1: usize) -> bool
Join two sets that contains given keys (union operation). Read more
fn find(&mut self, key: usize) -> usize
Returns the identifier of the set that the key belongs to.
fn get(&mut self, key: usize) -> &V
Returns the reference to the value of the set that the key belongs to.
fn get_mut(&mut self, key: usize) -> &mut V
Returns the mutable reference to the value of the set that the key belongs to.
fn new(len: usize) -> Self where
V: Default,
V: Default,
Creates empty UnionFind
struct.
impl<A: Union> FromIterator<A> for QuickFindUf<A>
[src]
fn from_iter<T: IntoIterator<Item = A>>(iterator: T) -> QuickFindUf<A>
Creates a value from an iterator. Read more
impl<A> Extend<A> for QuickFindUf<A>
[src]
fn extend<T>(&mut self, iterable: T) where
T: IntoIterator<Item = A>,
T: IntoIterator<Item = A>,
Extends a collection with the contents of an iterator. Read more