MobilityDB 1.3
Loading...
Searching...
No Matches
Macros | Functions
tnumber_gist.c File Reference

R-tree GiST index for temporal integers and temporal floats. More...

#include "pg_temporal/tnumber_gist.h"
#include <assert.h>
#include <float.h>
#include <limits.h>
#include <postgres.h>
#include <access/gist.h>
#include <utils/timestamp.h>
#include <meos.h>
#include <meos_internal.h>
#include "temporal/span.h"
#include "temporal/span_index.h"
#include "temporal/stratnum.h"
#include "temporal/tbox.h"
#include "temporal/tbox_index.h"
#include "temporal/temporal_boxops.h"
#include "temporal/type_util.h"
#include "pg_temporal/meos_catalog.h"
#include "pg_temporal/temporal.h"

Macros

#define PLACE_LEFT(box, off)
 
#define PLACE_RIGHT(box, off)
 

Functions

void bbox_gist_consider_split (ConsiderSplitContext *context, int dimNum, meosType bboxtype, double rightLower, int minLeftCount, double leftUpper, int maxLeftCount)
 Consider replacement of currently selected split with the better one. More...
 
void bbox_gist_fallback_split (GistEntryVector *entryvec, GIST_SPLITVEC *v, meosType bboxtype, void(*bbox_adjust)(void *, void *))
 Trivial split: half of entries will be placed on one page and the other half on another page. More...
 
Datum bbox_gist_picksplit (FunctionCallInfo fcinfo, meosType bboxtype, void(*bbox_adjust)(void *, void *), double(*bbox_penalty)(void *, void *))
 Double sorting split algorithm. More...
 
int interval_cmp_lower (const void *i1, const void *i2)
 Interval comparison function by lower bound of the intervals. More...
 
int interval_cmp_upper (const void *i1, const void *i2)
 Interval comparison function by upper bound of the intervals. More...
 
float non_negative (float val)
 Replace negative (or NaN) value with zero. More...
 
static void tbox_adjust (void *bbox1, void *bbox2)
 Expand the first box to include the second one. More...
 
Datum Tbox_gist_distance (PG_FUNCTION_ARGS)
 GiST support distance function that takes in a query and an entry and returns the "distance" between them. More...
 
Datum Tbox_gist_penalty (PG_FUNCTION_ARGS)
 GiST penalty method for temporal boxes. More...
 
Datum Tbox_gist_picksplit (PG_FUNCTION_ARGS)
 GiST picksplit method for temporal numbers. More...
 
Datum Tbox_gist_same (PG_FUNCTION_ARGS)
 GiST same method for temporal numbers Return true only when boxes are exactly the same. More...
 
Datum Tbox_gist_union (PG_FUNCTION_ARGS)
 GiST union method for temporal numbers. More...
 
double tbox_penalty (void *bbox1, void *bbox2)
 Return the amount by which the union of two temporal boxes is larger than the area of the first one. More...
 
static double tbox_size (const TBox *box)
 Return the size of a temporal box for penalty-calculation purposes. More...
 
static void tbox_union_rt (const TBox *a, const TBox *b, TBox *new)
 Calculates the union of two temporal boxes. More...
 
Datum Tnumber_gist_compress (PG_FUNCTION_ARGS)
 GiST compress method for temporal numbers. More...
 
Datum Tnumber_gist_consistent (PG_FUNCTION_ARGS)
 GiST consistent method for temporal numbers. More...
 
static bool tnumber_gist_get_tbox (FunctionCallInfo fcinfo, TBox *result, meosType type)
 Transform the query argument into a box initializing the dimensions that must not be taken into account by the operators to infinity. More...
 

Detailed Description

R-tree GiST index for temporal integers and temporal floats.

These functions are based on those in the file gistproc.c.