PostGIS  2.2.7dev-r@@SVN_REVISION@@
static bool gidx_equals ( GIDX *  a,
GIDX *  b 
)
static

Definition at line 400 of file gserialized_gist_nd.c.

References FALSE, gidx_dimensionality_check(), gidx_is_unknown(), and TRUE.

Referenced by gserialized_gist_consistent_leaf(), gserialized_gist_picksplit(), and gserialized_gist_same().

401 {
402  int i;
403 
404  POSTGIS_DEBUG(5, "entered function");
405 
406  if ( (a == NULL) && (b == NULL) ) return TRUE;
407  if ( (a == NULL) || (b == NULL) ) return FALSE;
408 
409  if ( gidx_is_unknown(a) && gidx_is_unknown(b) )
410  return TRUE;
411 
412  if ( gidx_is_unknown(a) || gidx_is_unknown(b) )
413  return FALSE;
414 
415  /* Ensure 'a' has the most dimensions. */
417 
418  /* For all shared dimensions min(a) == min(b), max(a) == max(b) */
419  for (i = 0; i < GIDX_NDIMS(b); i++)
420  {
421  if ( GIDX_GET_MIN(a,i) != GIDX_GET_MIN(b,i) )
422  return FALSE;
423  if ( GIDX_GET_MAX(a,i) != GIDX_GET_MAX(b,i) )
424  return FALSE;
425  }
426  /* For all unshared dimensions min(a) == 0.0, max(a) == 0.0 */
427  for (i = GIDX_NDIMS(b); i < GIDX_NDIMS(a); i++)
428  {
429  if ( GIDX_GET_MIN(a,i) != 0.0 )
430  return FALSE;
431  if ( GIDX_GET_MAX(a,i) != 0.0 )
432  return FALSE;
433  }
434  return TRUE;
435 }
static bool gidx_is_unknown(const GIDX *a)
static void gidx_dimensionality_check(GIDX **a, GIDX **b)
#define FALSE
Definition: dbfopen.c:168
#define TRUE
Definition: dbfopen.c:169

Here is the call graph for this function:

Here is the caller graph for this function: