Struct disjoint_sets::AUnionFind [] [src]

pub struct AUnionFind { /* fields omitted */ }

Concurrent union-find representing a set of disjoint sets.

Warning

I don’t yet have good reason to believe that this is correct.

Methods

impl AUnionFind
[src]

Creates a new asynchronous union-find of size elements.

The number of elements in all the sets.

Is the union-find devoid of elements?

It is possible to create an empty AUnionFind, but unlike with UnionFind it is not possible to add elements.

Joins the sets of the two given elements.

Returns whether anything changed. That is, if the sets were different, it returns true, but if they were already the same then it returns false.

Finds the representative element for the given element’s set.

Determines whether two elements are in the same set.

Forces all laziness, so that each element points directly to its set’s representative.

Returns a vector of set representatives.

Trait Implementations

impl Clone for AUnionFind
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for AUnionFind
[src]

Formats the value using the given formatter.

impl Default for AUnionFind
[src]

Returns the "default value" for a type. Read more