summaryrefslogtreecommitdiff
path: root/contrib/cube/cube.c
diff options
context:
space:
mode:
authorTom Lane2005-06-27 01:19:43 +0000
committerTom Lane2005-06-27 01:19:43 +0000
commitdcf2e1c8c790e99acb81673bc65ed6fddff4834d (patch)
tree1259430cc8c547421bae84243036c8ebf6fa0753 /contrib/cube/cube.c
parent54c80a3434b5ad3b3841b402097d7e3821f36c85 (diff)
Remove the << >> &< and &> operators for contrib/cube, which were
wrong, but nobody noticed because they were also useless.
Diffstat (limited to 'contrib/cube/cube.c')
-rw-r--r--contrib/cube/cube.c84
1 files changed, 0 insertions, 84 deletions
diff --git a/contrib/cube/cube.c b/contrib/cube/cube.c
index fd0609ee26..cc6e1a39fe 100644
--- a/contrib/cube/cube.c
+++ b/contrib/cube/cube.c
@@ -73,14 +73,6 @@ double *cube_size(NDBOX * a);
void rt_cube_size(NDBOX * a, double *sz);
/*
-** These make no sense for this type, but R-tree wants them
-*/
-bool cube_over_left(NDBOX * a, NDBOX * b);
-bool cube_over_right(NDBOX * a, NDBOX * b);
-bool cube_left(NDBOX * a, NDBOX * b);
-bool cube_right(NDBOX * a, NDBOX * b);
-
-/*
** miscellaneous
*/
bool cube_lt(NDBOX * a, NDBOX * b);
@@ -460,21 +452,9 @@ g_cube_leaf_consistent(NDBOX * key,
*/
switch (strategy)
{
- case RTLeftStrategyNumber:
- retval = (bool) cube_left(key, query);
- break;
- case RTOverLeftStrategyNumber:
- retval = (bool) cube_over_left(key, query);
- break;
case RTOverlapStrategyNumber:
retval = (bool) cube_overlap(key, query);
break;
- case RTOverRightStrategyNumber:
- retval = (bool) cube_over_right(key, query);
- break;
- case RTRightStrategyNumber:
- retval = (bool) cube_right(key, query);
- break;
case RTSameStrategyNumber:
retval = (bool) cube_eq(key, query);
break;
@@ -502,17 +482,9 @@ g_cube_internal_consistent(NDBOX * key,
*/
switch (strategy)
{
- case RTLeftStrategyNumber:
- case RTOverLeftStrategyNumber:
- retval = (bool) cube_over_left(key, query);
- break;
case RTOverlapStrategyNumber:
retval = (bool) cube_overlap(key, query);
break;
- case RTOverRightStrategyNumber:
- case RTRightStrategyNumber:
- retval = (bool) cube_right(key, query);
- break;
case RTSameStrategyNumber:
case RTContainsStrategyNumber:
retval = (bool) cube_contains(key, query);
@@ -692,62 +664,6 @@ rt_cube_size(NDBOX * a, double *size)
return;
}
-/* The following four methods compare the projections of the boxes
- onto the 0-th coordinate axis. These methods are useless for dimensions
- larger than 2, but it seems that R-tree requires all its strategies
- map to real functions that return something */
-
-/* is the right edge of (a) located to the left of
- the right edge of (b)? */
-bool
-cube_over_left(NDBOX * a, NDBOX * b)
-{
- if ((a == NULL) || (b == NULL))
- return (FALSE);
-
- return (Min(a->x[a->dim - 1], a->x[2 * a->dim - 1]) <=
- Min(b->x[b->dim - 1], b->x[2 * b->dim - 1]) &&
- !cube_left(a, b) && !cube_right(a, b));
-}
-
-/* is the left edge of (a) located to the right of
- the left edge of (b)? */
-bool
-cube_over_right(NDBOX * a, NDBOX * b)
-{
- if ((a == NULL) || (b == NULL))
- return (FALSE);
-
- return (Min(a->x[a->dim - 1], a->x[2 * a->dim - 1]) >=
- Min(b->x[b->dim - 1], b->x[2 * b->dim - 1]) &&
- !cube_left(a, b) && !cube_right(a, b));
-}
-
-
-/* return 'true' if the projection of 'a' is
- entirely on the left of the projection of 'b' */
-bool
-cube_left(NDBOX * a, NDBOX * b)
-{
- if ((a == NULL) || (b == NULL))
- return (FALSE);
-
- return (Min(a->x[a->dim - 1], a->x[2 * a->dim - 1]) <
- Min(b->x[0], b->x[b->dim]));
-}
-
-/* return 'true' if the projection of 'a' is
- entirely on the right of the projection of 'b' */
-bool
-cube_right(NDBOX * a, NDBOX * b)
-{
- if ((a == NULL) || (b == NULL))
- return (FALSE);
-
- return (Min(a->x[0], a->x[a->dim]) >
- Min(b->x[b->dim - 1], b->x[2 * b->dim - 1]));
-}
-
/* make up a metric in which one box will be 'lower' than the other
-- this can be useful for sorting and to determine uniqueness */
int32