1#ifndef CPROVER_UNION_FIND_H
2#define CPROVER_UNION_FIND_H
12 unsigned find(
unsigned a)
const;
53 unsigned count(
unsigned a)
const
69 for (
auto node :
nodes)
75 void re_root(
unsigned old,
unsigned new_root);
105 uuf.make_union(na, nb);
126 return uuf.is_root(a);
141 assert(
uuf.size() == this->size());
void clear()
Definition numbering.h:47
size_t size()
Definition numbering.h:53
numbering()
Definition numbering.h:15
unsigned number(const T &a)
Definition numbering.h:20
Definition union_find.h:98
unsigned find_number(const T &a)
Definition union_find.h:119
unsigned find_number(unsigned a) const
Definition union_find.h:114
const T & find(const T &a)
Definition union_find.h:109
bool make_union(const T &a, const T &b)
Definition union_find.h:101
unsigned_union_find uuf
Definition union_find.h:153
numbering< T > subt
Definition union_find.h:154
bool is_root(const T &a)
Definition union_find.h:129
unsigned number(const T &a)
Definition union_find.h:134
void clear()
Definition union_find.h:146
bool is_root_number(unsigned a) const
Definition union_find.h:124
Definition union_find.h:9
void intersection(const unsigned_union_find &other)
Definition union_find.cpp:118
void resize(unsigned size)
Definition union_find.h:24
void re_root(unsigned old, unsigned new_root)
Definition union_find.cpp:68
std::vector< nodet > nodes
Definition union_find.h:93
unsigned find(unsigned a) const
Definition union_find.cpp:138
unsigned count(unsigned a) const
Definition union_find.h:53
void clear()
Definition union_find.h:31
bool same_set(unsigned a, unsigned b) const
Definition union_find.h:43
void swap(unsigned_union_find &other)
Definition union_find.h:19
unsigned size() const
Definition union_find.h:48
bool is_root(unsigned a) const
Definition union_find.h:36
void isolate(unsigned a)
Definition union_find.cpp:34
void check_index(unsigned a)
Definition union_find.h:60
unsigned count_roots() const
Definition union_find.h:66
void make_union(unsigned a, unsigned b)
Definition union_find.cpp:4
unsigned get_other(unsigned a)
Definition union_find.cpp:102
@ other
Definition converter_compare.cpp:887
#define T
Definition exp2f.c:24
#define true
Definition stdbool.h:11
nodet()
Definition union_find.h:88
unsigned count
Definition union_find.h:83
bool root
Definition union_find.h:86
unsigned parent
Definition union_find.h:84