77 old_root=
find(old_root);
80 if(
find(new_root)!=old_root)
86 nodes[new_root].parent=new_root;
89 nodes[old_root].parent=new_root;
90 nodes[old_root].count=0;
95 if(i!=new_root && i!=old_root && !
is_root(i))
98 if(
r==old_root ||
r==new_root)
99 nodes[i].parent=new_root;
113 if(
find(i)==a && i!=a)
void intersection(const unsigned_union_find &other)
void resize(size_type size)
std::vector< nodet > nodes
void check_index(size_type a)
void re_root(size_type old, size_type new_root)
size_type find(size_type a) const
size_type count(size_type a) const
void swap(unsigned_union_find &other)
bool is_root(size_type a) const
size_type get_other(size_type a)
void make_union(size_type a, size_type b)
bool same_set(size_type a, size_type b) const
void isolate(size_type a)
#define CHECK_RETURN(CONDITION)
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
#define PRECONDITION(CONDITION)