| UF Methods |
The UF type exposes the following members.
| Name | Description | |
|---|---|---|
| Connected |
Returns true if the the two sites are in the same component. | |
| Find |
Returns the component identifier for the component containing site p. | |
| MainTest |
Reads in a an integer N and a sequence of pairs of integers
(between 0 and N-1) from standard input, where each integer
in the pair represents some site;
if the sites are in different components, merge the two components
and print the pair to standard output. | |
| Union |
Merges the component containing site p with the
the component containing site q. |