|
Hello everyone!! I'm Roberto from Italy. I'm working on my thesis in C++ and I'm using the union-find data structure.
I have a graph where an integer variable is stored. Initially, every vertex is in a singleton set named by itself. For every node v, the operationf find(v) returns the current name of the set in the partition that contains v (ie, find(v) returns the node with the highest value of the variable in the partition that contains the node v) , and when u and v are distinct current name of the set in the partition that contains v, and when u and v are distinct current names of sets in the partitions, union(u,v) replaces these sets by their union and gives the new set the name u. (ie. union returns a new partition where u is the name of the node with highest value of that variable)
Can anyone suggests me a good union-find library ?
Regards, Roberto
|