PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ union_if_available()

static void union_if_available ( UNIONFIND uf,
uint32_t  p,
uint32_t  q,
char *  is_in_core,
char *  in_a_cluster 
)
static

Definition at line 288 of file lwgeom_geos_cluster.c.

References LW_TRUE, and UF_union().

Referenced by union_dbscan_general().

289 {
290  if (in_a_cluster[q])
291  {
292  /* Can we merge p's cluster with q's cluster? We can do this only
293  * if both p and q are considered _core_ points of their respective
294  * clusters.
295  */
296  if (is_in_core[q])
297  {
298  UF_union(uf, p, q);
299  }
300  }
301  else
302  {
303  UF_union(uf, p, q);
304  in_a_cluster[q] = LW_TRUE;
305  }
306 }
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:76
void UF_union(UNIONFIND *uf, uint32_t i, uint32_t j)
Definition: lwunionfind.c:84
Here is the call graph for this function:
Here is the caller graph for this function: