Are the 2
verticies connected?
valueA
(*): the first vertex to comparevalueB
(*): the second vertex to compare
(boolean): true if the verticies are connected, false if not
[values]
(*[]): an array of verticies to add to the set
(Number): The number of sets
Find the id for a value
value
(*): the value to lookup
(*): the identity of the set containing the item
Returns a 2
D array of the unique sets and the values in those sets
(*): [][] a 2
D array containing the disjoint sets
Join the verticies if not alredy in the same set
valueA
(*): the first vertex to connectvalueB
(*): the second vertex to connect