PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ UF_find()

uint32_t UF_find ( UNIONFIND uf,
uint32_t  i 
)

Definition at line 48 of file lwunionfind.c.

References UNIONFIND::clusters.

Referenced by combine_geometries(), test_unionfind_path_compression(), UF_ordered_by_cluster(), UF_union(), union_if_dwithin(), and union_if_intersecting().

49 {
50  uint32_t base = i;
51  while (uf->clusters[base] != base) {
52  base = uf->clusters[base];
53  }
54 
55  while (i != base) {
56  uint32_t next = uf->clusters[i];
57  uf->clusters[i] = base;
58  i = next;
59  }
60 
61  return i;
62 }
uint32_t * clusters
Definition: lwunionfind.h:20
Here is the caller graph for this function: