MobilityDB
1.0
|
Functions for selectivity estimation of operators on temporal points. More...
#include "point/tpoint_selfuncs.h"
#include <assert.h>
#include <float.h>
#include "general/period.h"
#include "general/temporal_selfuncs.h"
#include "point/stbox.h"
#include "point/tpoint.h"
#include "point/tpoint_analyze.h"
#include "point/tpoint_boxops.h"
Functions | |
static int | nd_stats_value_index (const ND_STATS *stats, const int *indexes) |
Given a position in the n-d histogram (i,j,k,l) return the position in the 1-d values array. More... | |
static int | nd_box_contains (const ND_BOX *a, const ND_BOX *b, int ndims) |
Returns true if a contains b, false otherwise. More... | |
bool | nd_box_left (const ND_BOX *a, const ND_BOX *b) |
Returns true if a is strictly left of b, false otherwise. More... | |
bool | nd_box_overleft (const ND_BOX *a, const ND_BOX *b) |
Returns true if a does not extend to right of b, false otherwise. More... | |
bool | nd_box_right (const ND_BOX *a, const ND_BOX *b) |
Returns true if a is strictly right of b, false otherwise. More... | |
bool | nd_box_overright (const ND_BOX *a, const ND_BOX *b) |
Returns true if a does not extend to left of b, false otherwise. More... | |
bool | nd_box_below (const ND_BOX *a, const ND_BOX *b) |
Returns true if a is strictly below of b, false otherwise. More... | |
bool | nd_box_overbelow (const ND_BOX *a, const ND_BOX *b) |
Returns true if a does not extend above of b, false otherwise. More... | |
bool | nd_box_above (const ND_BOX *a, const ND_BOX *b) |
Returns true if a is strictly above of b, false otherwise. More... | |
bool | nd_box_overabove (const ND_BOX *a, const ND_BOX *b) |
Returns true if a does not extend below of b, false otherwise. More... | |
bool | nd_box_front (const ND_BOX *a, const ND_BOX *b) |
Returns true if a is strictly front of b, false otherwise. More... | |
bool | nd_box_overfront (const ND_BOX *a, const ND_BOX *b) |
Returns true if a does not extend to the back of b, false otherwise. More... | |
bool | nd_box_back (const ND_BOX *a, const ND_BOX *b) |
Returns true if a strictly back of b, false otherwise. More... | |
bool | nd_box_overback (const ND_BOX *a, const ND_BOX *b) |
Returns true if a does not extend to the front of b, false otherwise. More... | |
static double | nd_box_ratio_left (const ND_BOX *b1, const ND_BOX *b2) |
Returns the proportion of b2 that is left of b1. More... | |
static double | nd_box_ratio_overleft (const ND_BOX *b1, const ND_BOX *b2) |
Returns the proportion of b2 that is overleft of b1. More... | |
static double | nd_box_ratio_right (const ND_BOX *b1, const ND_BOX *b2) |
Returns the proportion of b2 that is right of b1. More... | |
static double | nd_box_ratio_overright (const ND_BOX *b1, const ND_BOX *b2) |
Returns the proportion of b2 that is overright of b1. More... | |
static double | nd_box_ratio_below (const ND_BOX *b1, const ND_BOX *b2) |
Returns the proportion of b2 that is below of b1. More... | |
static double | nd_box_ratio_overbelow (const ND_BOX *b1, const ND_BOX *b2) |
Returns the proportion of b2 that is overbelow of b1. More... | |
static double | nd_box_ratio_above (const ND_BOX *b1, const ND_BOX *b2) |
Returns the proportion of b2 that is above of b1. More... | |
static double | nd_box_ratio_overabove (const ND_BOX *b1, const ND_BOX *b2) |
Returns the proportion of b2 that is overabove of b1. More... | |
static double | nd_box_ratio_front (const ND_BOX *b1, const ND_BOX *b2) |
Returns the proportion of b2 that is front of b1. More... | |
static double | nd_box_ratio_overfront (const ND_BOX *b1, const ND_BOX *b2) |
Returns the proportion of b2 that is overfront of b1. More... | |
static double | nd_box_ratio_back (const ND_BOX *b1, const ND_BOX *b2) |
Returns the proportion of b2 that is back of b1. More... | |
static double | nd_box_ratio_overback (const ND_BOX *b1, const ND_BOX *b2) |
Returns the proportion of b2 that is overback of b1. More... | |
static double | nd_box_ratio_position (const ND_BOX *b1, const ND_BOX *b2, CachedOp op) |
Dispatch function for the position operators. More... | |
bool | tpoint_const_to_stbox (Node *other, STBOX *box) |
Transform the constant into an STBOX. More... | |
static void | nd_box_from_stbox (const STBOX *box, ND_BOX *nd_box) |
Set the values of an ND_BOX from an STBOX The function only takes into account the x, y, and z dimensions of the box? and assumes that they exist. More... | |
static bool | tpoint_cachedop (Oid operator, CachedOp *cachedOp) |
Get the enum value associated to the operator. More... | |
static double | default_tpoint_selectivity (CachedOp operator) |
Returns a default selectivity estimate for given operator, when we don't have statistics or cannot use them for some reason. More... | |
static float8 | calc_geo_selectivity (VariableStatData *vardata, const STBOX *box, CachedOp op) |
Returns an estimate of the selectivity of a spatiotemporal search box by looking at data in the ND_STATS structure. More... | |
PGDLLEXPORT Datum | tpoint_sel (PG_FUNCTION_ARGS) |
Estimate the join selectivity value of the operators for temporal points. More... | |
PGDLLEXPORT Datum | tpoint_joinsel (PG_FUNCTION_ARGS) |
Estimate the join selectivity value of the operators for temporal points. More... | |
Functions for selectivity estimation of operators on temporal points.
Selectivity functions for temporal point types.
Most definitions in this file come from the PostGIS file gserialized_estimate.c