Trait mz_transform::analysis::equivalences::UnionFind

source ·
trait UnionFind<T> {
    // Required methods
    fn find<'a>(&'a mut self, x: &T) -> Option<&'a T>;
    fn union(&mut self, x: &T, y: &T);
}

Required Methods§

source

fn find<'a>(&'a mut self, x: &T) -> Option<&'a T>

Sets self[x] to the root from x, and returns a reference to the root.

source

fn union(&mut self, x: &T, y: &T)

Ensures that x and y have the same root.

Implementations on Foreign Types§

source§

impl<T: Clone + Ord> UnionFind<T> for BTreeMap<T, T>

source§

fn find<'a>(&'a mut self, x: &T) -> Option<&'a T>

source§

fn union(&mut self, x: &T, y: &T)

Implementors§