#include <unionfind.h>
Collaboration diagram for unionfind:

Public Methods | |
| unionfind (unsigned int s) | |
| Construct a new union find structure of a given size. | |
| ~unionfind () | |
| Destructor. | |
| T | find (T a) |
| Finds the equivilence class of a. | |
| void | join (T a, T b) |
| Join the equivilence classes of a and b. | |
Protected Methods | |
| void | link (T a, T b) |
| Internal link of two equivilence classes. | |
Protected Attributes | |
| unsigned int | size |
| Size of the union find structure. | |
| T * | array |
| Mapping of values to equivilence class. | |