MobilityDB 1.1
Macros | Functions
tnumber_gist.c File Reference
#include "pg_general/tnumber_gist.h"
#include <assert.h>
#include <float.h>
#include <math.h>
#include <utils/timestamp.h>
#include <meos.h>
#include <meos_internal.h>
#include "general/set.h"
#include "general/temporal_boxops.h"
#include "general/type_util.h"
#include "pg_general/meos_catalog.h"
#include "pg_general/temporal.h"
#include "pg_general/time_gist.h"
Include dependency graph for tnumber_gist.c:

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_ext (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 interval. More...
 
int interval_cmp_upper (const void *i1, const void *i2)
 Interval comparison function by upper bound of the interval. 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...
 
PGDLLEXPORT Datum Tbox_gist_distance (PG_FUNCTION_ARGS)
 GiST support function. More...
 
PGDLLEXPORT Datum Tbox_gist_penalty (PG_FUNCTION_ARGS)
 GiST penalty method for temporal boxes. More...
 
PGDLLEXPORT Datum Tbox_gist_picksplit (PG_FUNCTION_ARGS)
 GiST picksplit method for temporal numbers. More...
 
PGDLLEXPORT Datum Tbox_gist_same (PG_FUNCTION_ARGS)
 GiST same method for temporal numbers. More...
 
PGDLLEXPORT Datum Tbox_gist_union (PG_FUNCTION_ARGS)
 GiST union method for temporal numbers. More...
 
bool tbox_index_consistent_leaf (const TBox *key, const TBox *query, StrategyNumber strategy)
 R-tree GiST index for temporal integers and temporal floats. More...
 
double tbox_penalty (void *bbox1, void *bbox2)
 Return the amount by which the union of the two boxes is larger than the original TBox's area. 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 tboxes. More...
 
PGDLLEXPORT Datum Tnumber_gist_compress (PG_FUNCTION_ARGS)
 GiST compress method for temporal numbers. More...
 
static bool tnumber_gist_consistent (const TBox *key, const TBox *query, StrategyNumber strategy)
 GiST internal-page consistent method for temporal numbers. More...
 
PGDLLEXPORT Datum Tnumber_gist_consistent (PG_FUNCTION_ARGS)
 GiST consistent method for temporal numbers. More...
 
static bool tnumber_gist_get_tbox (FunctionCallInfo fcinfo, TBox *result, Oid typid)
 Transform the query argument into a box initializing the dimensions that must not be taken into account by the operators to infinity. More...