pub struct QuickFindUf<V> { /* private fields */ }Expand description
Union-Find implementation with quick find operation.
Trait Implementations§
Source§impl<V> Clone for QuickFindUf<V>
impl<V> Clone for QuickFindUf<V>
Source§fn clone(&self) -> QuickFindUf<V>
fn clone(&self) -> QuickFindUf<V>
Returns a duplicate of the value. Read more
Source§fn clone_from(&mut self, other: &QuickFindUf<V>)
fn clone_from(&mut self, other: &QuickFindUf<V>)
Performs copy-assignment from
source. Read moreSource§impl<V: Debug> Debug for QuickFindUf<V>
impl<V: Debug> Debug for QuickFindUf<V>
Source§impl<A> Extend<A> for QuickFindUf<A>
impl<A> Extend<A> for QuickFindUf<A>
Source§fn extend<T>(&mut self, iterable: T)where
T: IntoIterator<Item = A>,
fn extend<T>(&mut self, iterable: T)where
T: IntoIterator<Item = A>,
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<A: Union> FromIterator<A> for QuickFindUf<A>
impl<A: Union> FromIterator<A> for QuickFindUf<A>
Source§fn from_iter<T: IntoIterator<Item = A>>(iterator: T) -> QuickFindUf<A>
fn from_iter<T: IntoIterator<Item = A>>(iterator: T) -> QuickFindUf<A>
Creates a value from an iterator. Read more
Source§impl<V: Union> UnionFind<V> for QuickFindUf<V>
impl<V: Union> UnionFind<V> for QuickFindUf<V>
Source§fn union(&mut self, key0: usize, key1: usize) -> bool
fn union(&mut self, key0: usize, key1: usize) -> bool
Join two sets that contains given keys (union operation). Read more
Source§fn find(&mut self, key: usize) -> usize
fn find(&mut self, key: usize) -> usize
Returns the identifier of the set that the key belongs to.
Source§fn get(&mut self, key: usize) -> &V
fn get(&mut self, key: usize) -> &V
Returns the reference to the value of the set that the key belongs to.
Auto Trait Implementations§
impl<V> Freeze for QuickFindUf<V>
impl<V> RefUnwindSafe for QuickFindUf<V>where
V: RefUnwindSafe,
impl<V> Send for QuickFindUf<V>where
V: Send,
impl<V> Sync for QuickFindUf<V>where
V: Sync,
impl<V> Unpin for QuickFindUf<V>where
V: Unpin,
impl<V> UnsafeUnpin for QuickFindUf<V>
impl<V> UnwindSafe for QuickFindUf<V>where
V: UnwindSafe,
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