#structure #union-find #tarjan

disjoint-set

A implementation of Tarjan's Union-Find Data Structure

2 releases

Uses old Rust 2015

0.0.2 Mar 6, 2015
0.0.1 Mar 6, 2015

#27 in #union-find

Download history 925/week @ 2024-03-13 1435/week @ 2024-03-20 2147/week @ 2024-03-27 1724/week @ 2024-04-03 1075/week @ 2024-04-10 1058/week @ 2024-04-17 1051/week @ 2024-04-24 1453/week @ 2024-05-01 1331/week @ 2024-05-08 923/week @ 2024-05-15 372/week @ 2024-05-22 509/week @ 2024-05-29 398/week @ 2024-06-05 233/week @ 2024-06-12 302/week @ 2024-06-19 197/week @ 2024-06-26

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.

No runtime deps