0.2.0 • Published 6 years ago
disjoint-set-reason v0.2.0
disjoint-set-reason
An implementation of the Disjoint Set data structure in Reason.
Example
open DisjointSet;
let disjoint_set = makeSet(10); // Creates a Disjoint Set with a size of 10.
disjoint_set -> union(2, 3); // Union set 2 with set 3.
let twos_parent = disjoint_set -> find(2); // Find 2's parent.
Js.log(twos_parent); // Prints out '3'.Installation
yarn add disjoint-set-reasonThen add disjoint-set-reason to bs-dependencies in your bsconfig.json:
{
...
"bs-dependencies": ["disjoint-set-reason"]
}Contribute
git clone https://github.com/dylanirlbeck/disjoint-set-reason
cd disjoint-set-reason
yarn
```
```