MobilityDB  1.0
Data Structures | Macros | Functions
tpoint_gist.c File Reference

R-tree GiST index for temporal points. More...

#include "point/tpoint_gist.h"
#include <assert.h>
#include <float.h>
#include <utils/timestamp.h>
#include <access/gist.h>
#include "general/time_gist.h"
#include "general/temporaltypes.h"
#include "general/tempcache.h"
#include "point/tpoint.h"
#include "general/tnumber_gist.h"
#include "point/tpoint_boxops.h"
#include "point/tpoint_distance.h"
#include "point/tpoint_posops.h"
Include dependency graph for tpoint_gist.c:

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 stbox_index_consistent_leaf (const STBOX *key, const STBOX *query, StrategyNumber strategy)
 Leaf-level consistency for temporal points. More...
 
static bool stbox_gist_consistent_internal (const STBOX *key, const STBOX *query, StrategyNumber strategy)
 Internal-page consistent method for temporal points. More...
 
bool tpoint_index_recheck (StrategyNumber strategy)
 Determine whether a recheck is necessary depending on the strategy. More...
 
static bool tpoint_index_get_stbox (FunctionCallInfo fcinfo, STBOX *result, Oid subtype)
 Transform the query argument into a box initializing the dimensions that must not be taken into account by the operators to infinity. More...
 
PGDLLEXPORT Datum stbox_gist_consistent (PG_FUNCTION_ARGS)
 GiST consistent method for temporal points. More...
 
static void stbox_adjust (STBOX *b, const STBOX *addon)
 Increase the first box to include the second one. More...
 
PGDLLEXPORT Datum stbox_gist_union (PG_FUNCTION_ARGS)
 GiST union method for temporal points. More...
 
PGDLLEXPORT Datum tpoint_gist_compress (PG_FUNCTION_ARGS)
 GiST compress methods for temporal points. More...
 
PGDLLEXPORT Datum tpoint_gist_decompress (PG_FUNCTION_ARGS)
 GiST decompress method for temporal point types (result in an stbox) More...
 
static void stbox_union_rt (STBOX *n, const STBOX *a, const STBOX *b)
 Calculates the union of two tboxes. More...
 
static double stbox_size (const STBOX *box)
 Returns the size of a spatiotemporal box for penalty-calculation purposes. More...
 
static double stbox_penalty (const STBOX *original, const STBOX *new)
 Returns the amount by which the union of the two boxes is larger than the original STBOX's volume. More...
 
PGDLLEXPORT Datum stbox_gist_penalty (PG_FUNCTION_ARGS)
 GiST penalty method for temporal points. More...
 
static void stbox_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...
 
static void stbox_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 stbox_gist_picksplit (PG_FUNCTION_ARGS)
 GiST picksplit method for temporal points. More...
 
PGDLLEXPORT Datum stbox_gist_same (PG_FUNCTION_ARGS)
 GiST same method for temporal points. More...
 
Datum stbox_gist_distance (PG_FUNCTION_ARGS)
 GiST support function. More...
 

Detailed Description

R-tree GiST index for temporal points.