![]() |
MobilityDB 1.3
|
Quad-tree SP-GiST index for span types. More...
#include <assert.h>
#include <float.h>
#include <postgres.h>
#include <access/spgist.h>
#include <catalog/pg_type_d.h>
#include <utils/timestamp.h>
#include <meos.h>
#include <meos_internal.h>
#include "temporal/set.h"
#include "temporal/span.h"
#include "temporal/span_index.h"
#include "temporal/stratnum.h"
#include "pg_temporal/meos_catalog.h"
#include "pg_temporal/spanset.h"
#include "pg_temporal/temporal.h"
Data Structures | |
struct | SortedSpan |
Structure to sort a set of spans of an inner node. More... | |
struct | SpanNode |
Structure to represent the bounding box of an inner node containing a set of spans. More... | |
Typedefs | |
typedef struct SortedSpan | SortedSpan |
Structure to sort a set of spans of an inner node. More... | |
Functions | |
bool | adjacent2D (const SpanNode *nodebox, const Span *query) |
Can any span from nodebox be to the left of the query? More... | |
Datum | Bigintspan_spgist_config (PG_FUNCTION_ARGS) |
SP-GiST config function for span types. More... | |
bool | contain2D (const SpanNode *nodebox, const Span *query) |
Can any span from nodebox contain the query? More... | |
Datum | Datespan_spgist_config (PG_FUNCTION_ARGS) |
SP-GiST config function for span types. More... | |
double | distance_span_nodespan (Span *query, SpanNode *nodebox) |
Distance between a query span and a box of spans. More... | |
Datum | Floatspan_spgist_config (PG_FUNCTION_ARGS) |
SP-GiST config function for span types. More... | |
static uint8 | getQuadrant2D (const Span *centroid, const Span *query) |
Calculate the quadrant. More... | |
Datum | Intspan_spgist_config (PG_FUNCTION_ARGS) |
SP-GiST config function for span types. More... | |
bool | left2D (const SpanNode *nodebox, const Span *query) |
Can any span from nodebox be to the left of the query? More... | |
bool | overlap2D (const SpanNode *nodebox, const Span *query) |
Can any span from nodebox overlap with the query? More... | |
bool | overLeft2D (const SpanNode *nodebox, const Span *query) |
Can any span from nodebox does not extend to the right of the query? More... | |
bool | overRight2D (const SpanNode *nodebox, const Span *query) |
Can any span from nodebox does not extend to the left of the query? More... | |
bool | right2D (const SpanNode *nodebox, const Span *query) |
Can any span from nodebox be right the query? More... | |
Datum | Set_spgist_compress (PG_FUNCTION_ARGS) |
SP-GiST compress function for sets. More... | |
Datum | Span_kdtree_choose (PG_FUNCTION_ARGS) |
K-d tree choose function for span types. More... | |
Datum | Span_kdtree_inner_consistent (PG_FUNCTION_ARGS) |
K-d tree inner consistent function for span types. More... | |
Datum | Span_kdtree_picksplit (PG_FUNCTION_ARGS) |
K-d tree pick-split function for span types. More... | |
static int | span_level_cmp (Span *centroid, Span *query, int level) |
Determine which half a 2D-mapped span falls into, relative to the centroid and the level number. More... | |
static int | span_lower_qsort_cmp (const void *a, const void *b) |
Comparator to sort spans on their lower bound. More... | |
Datum | Span_quadtree_choose (PG_FUNCTION_ARGS) |
Determine which quadrant a 2D-mapped span falls into, relative to the centroid. More... | |
Datum | Span_quadtree_inner_consistent (PG_FUNCTION_ARGS) |
Quad-tree inner consistent function for span types. More... | |
Datum | Span_quadtree_picksplit (PG_FUNCTION_ARGS) |
SP-GiST pick-split function for span types. More... | |
bool | span_spgist_get_span (const ScanKeyData *scankey, Span *result) |
Transform a query argument into a span. More... | |
Datum | Span_spgist_inner_consistent (FunctionCallInfo fcinfo, SPGistIndexType idxtype) |
Generic SP-GiST inner consistent function for span types. More... | |
Datum | Span_spgist_leaf_consistent (PG_FUNCTION_ARGS) |
SP-GiST leaf consistency function for span types. More... | |
static int | span_upper_qsort_cmp (const void *a, const void *b) |
Comparator to sort spans on their upper bound. More... | |
SpanNode * | spannode_copy (const SpanNode *orig) |
Copy a traversal value. More... | |
void | spannode_init (SpanNode *nodebox, meosType spantype, meosType basetype) |
Initialize the traversal value. More... | |
void | spannode_kdtree_next (const SpanNode *nodebox, const Span *centroid, uint8 node, int level, SpanNode *next_nodespan) |
Compute the next traversal value for a k-d tree given the bounding box and the centroid of the current node, the half number (0 or 1), and the level. More... | |
void | spannode_quadtree_next (const SpanNode *nodebox, const Span *centroid, uint8 quadrant, SpanNode *next_nodespan) |
Compute the next traversal value for a quadtree given the bounding box and the centroid of the current node and the quadrant number (0 to 3) More... | |
Datum | Spanset_spgist_compress (PG_FUNCTION_ARGS) |
SP-GiST compress function for span sets. More... | |
Datum | Tstzspan_spgist_config (PG_FUNCTION_ARGS) |
SP-GiST config function for span types. More... | |
Quad-tree SP-GiST index for span types.
The functions in this file are based on those in the file rangetypes_spgist.c
.