### 2 releases

Uses old Rust 2015

0.0.2 | Mar 6, 2015 |
---|---|

0.0.1 | Mar 6, 2015 |

#**27** in #union-find

**1,230** downloads per month

**MIT**license

4KB

89 lines

# union-find

A rust implementation of Tarjan's disjoint-set data structure with path compression optimization.

###
`lib.rs`

:

Returns Some(num), num is the tag of subset in which x is.
If x is not in the data structure, it returns None.

Union the subsets to which x and y belong.
If it returns Ok, it is the tag for unified subset.
it returns Err(), at least one of x and y is not in the disjoint-set.