PostGIS  2.5.0dev-r@@SVN_REVISION@@

◆ UF_find()

uint32_t UF_find ( UNIONFIND uf,
uint32_t  i 
)

Definition at line 61 of file lwunionfind.c.

References UNIONFIND::clusters.

Referenced by combine_geometries(), test_unionfind_path_compression(), UF_get_collapsed_cluster_ids(), UF_ordered_by_cluster(), UF_size(), UF_union(), union_dbscan_general(), union_dbscan_minpoints_1(), and union_intersecting_pairs().

62 {
63  uint32_t base = i;
64  while (uf->clusters[base] != base) {
65  base = uf->clusters[base];
66  }
67 
68  while (i != base) {
69  uint32_t next = uf->clusters[i];
70  uf->clusters[i] = base;
71  i = next;
72  }
73 
74  return i;
75 }
uint32_t * clusters
Definition: lwunionfind.h:33
unsigned int uint32_t
Definition: uthash.h:78
Here is the caller graph for this function: