2 #ifndef vbl_disjoint_sets_h_ 3 #define vbl_disjoint_sets_h_ 16 # include <vcl_msvc_warnings.h> 57 int size(
int set_id)
const;
80 #endif // vbl_disjoint_sets_h_ int rank
represents the approximate max height of the node in its subtree.
void add_elements(int num_to_add)
~vbl_disjoint_sets()
Destructor.
vbl_array_1d< node > nodes_
void set_union(int set_id1, int set_id2)
Combine two sets into one.
int find_set(int element) const
Find the set identifier that an element currently belongs to.
int num_sets() const
Returns the number of sets.
int size(int set_id) const
Returns the number of elements in set specified by set_id.