Closed cyderize closed 8 years ago
Adds a disjoint set ADT with the following operations:
items
x
d
y
Note that the watcher morph for this ADT is based on lists, and is not awfully efficient (but better than not being able to see anything at all).
This could be used for example in Kruskal's algorithm for the MST.
Closes #407.
This works nicely, thanks @cyderize
Adds a disjoint set ADT with the following operations:
items
]x
to disjoint setd
x
to the disjoint set as a singletonx
andy
in disjoint setd
x
andy
togetherx
in disjoint setd
x
belongs toNote that the watcher morph for this ADT is based on lists, and is not awfully efficient (but better than not being able to see anything at all).
This could be used for example in Kruskal's algorithm for the MST.
Closes #407.