MobilityDB
1.0
|
R-tree GiST index for temporal integers and temporal floats. More...
#include "general/tnumber_gist.h"
#include <assert.h>
#include <float.h>
#include <math.h>
#include <access/gist.h>
#include <utils/builtins.h>
#include "general/rangetypes_ext.h"
#include "general/period.h"
#include "general/timeops.h"
#include "general/time_gist.h"
#include "general/temporal_util.h"
#include "general/tempcache.h"
#include "general/temporal_boxops.h"
#include "general/temporal_posops.h"
#include "general/tnumber_distance.h"
Data Structures | |
struct | ConsiderSplitContext |
Structure keeping context for the function period_gist_consider_split. More... | |
Macros | |
#define | PLACE_LEFT(box, off) |
#define | PLACE_RIGHT(box, off) |
Functions | |
bool | tbox_index_consistent_leaf (const TBOX *key, const TBOX *query, StrategyNumber strategy) |
Leaf-level consistency for temporal numbers. More... | |
static bool | tbox_gist_consistent_internal (const TBOX *key, const TBOX *query, StrategyNumber strategy) |
GiST internal-page consistent method for temporal numbers. More... | |
static bool | tnumber_index_get_tbox (FunctionCallInfo fcinfo, TBOX *query, Oid subtype) |
Transform the query into a box initializing the dimensions that must not be taken into account by the operators to infinity. More... | |
PGDLLEXPORT Datum | tnumber_gist_consistent (PG_FUNCTION_ARGS) |
GiST consistent method for temporal numbers. More... | |
static void | tbox_adjust (TBOX *b, const TBOX *addon) |
Increase the first box to include the second one. More... | |
PGDLLEXPORT Datum | tbox_gist_union (PG_FUNCTION_ARGS) |
GiST union method for temporal numbers. More... | |
PGDLLEXPORT Datum | tnumber_gist_compress (PG_FUNCTION_ARGS) |
GiST compress method for temporal numbers. More... | |
PGDLLEXPORT Datum | tnumber_gist_decompress (PG_FUNCTION_ARGS) |
GiST decompress method for temporal numbers (result in a temporal box) More... | |
static void | tbox_union_rt (TBOX *n, const TBOX *a, const TBOX *b) |
Calculates the union of two tboxes. More... | |
static double | tbox_size (const TBOX *box) |
Returns the size of a temporal box for penalty-calculation purposes. More... | |
static double | tbox_penalty (const TBOX *original, const TBOX *new) |
Returns the amount by which the union of the two boxes is larger than the original TBOX's area. More... | |
PGDLLEXPORT Datum | tbox_gist_penalty (PG_FUNCTION_ARGS) |
GiST penalty method for temporal boxes. More... | |
static void | tbox_gist_fallback_split (GistEntryVector *entryvec, GIST_SPLITVEC *v) |
Trivial split: half of entries will be placed on one page and another half - to another. 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_gist_consider_split (ConsiderSplitContext *context, int dimNum, double rightLower, int minLeftCount, double leftUpper, int maxLeftCount) |
Consider replacement of currently selected split with the better one. 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... | |
Datum | tbox_gist_distance (PG_FUNCTION_ARGS) |
GiST support function. More... | |
R-tree GiST index for temporal integers and temporal floats.
These functions are based on those in the file gistproc.c
.