An instance P of the data type Union_find<T,A> is a partition of values of type T into disjoint sets. The template parameter A has to be a model of the allocator concept as defined in the C++ standard. It has a default argument CGAL_ALLOCATOR(T).
#include <CGAL/Union_find.h>
| |
values stored in items (equal to T).
| |
| |
handle to values.
| |
| |
iterator over values.
|
There are also constant versions const_handle and const_iterator.
| |
allocator.
|
| |
creates an instance P of type
Union_find<T,A> and initializes it to the empty partition.
|
Union_find<T,A> is implemented with union by rank and path compression. The running time for set operations on elements is where is the extremely slow growing inverse of Ackermann's function.