MobilityDB 1.1
Data Structures | Macros | Typedefs | Functions
tpoint_analyze.h File Reference
#include <postgres.h>
#include <commands/vacuum.h>
#include <liblwgeom.h>
Include dependency graph for tpoint_analyze.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ND_BOX_T
 N-dimensional box type for calculations, to avoid doing explicit axis conversions from GBOX in all calculations at every step. More...
 
struct  ND_IBOX_T
 N-dimensional box index type. More...
 
struct  ND_STATS_T
 N-dimensional statistics structure. More...
 

Macros

#define ND_DIMS   4
 Functions for gathering statistics from temporal point columns. More...
 

Typedefs

typedef struct ND_BOX_T ND_BOX
 N-dimensional box type for calculations, to avoid doing explicit axis conversions from GBOX in all calculations at every step. More...
 
typedef struct ND_IBOX_T ND_IBOX
 N-dimensional box index type. More...
 
typedef struct ND_STATS_T ND_STATS
 N-dimensional statistics structure. More...
 

Functions

int nd_box_init (ND_BOX *a)
 Zero out an ND_BOX. More...
 
int nd_box_intersects (const ND_BOX *a, const ND_BOX *b, int ndims)
 Return true if ND_BOX a overlaps b, false otherwise. More...
 
int nd_box_overlap (const ND_STATS *nd_stats, const ND_BOX *nd_box, ND_IBOX *nd_ibox)
 What stats cells overlap with this ND_BOX? Put the lowest cell addresses in ND_IBOX->min and the highest in ND_IBOX->max. More...
 
double nd_box_ratio_overlaps (const ND_BOX *b1, const ND_BOX *b2, int ndims)
 Return the proportion of b2 that is covered by b1. More...
 
int nd_increment (ND_IBOX *ibox, int ndims, int *counter)
 Given an n-d index array (counter), and a domain to increment it in (ibox) increment it by one, unless it's already at the max of the domain, in which case return false. More...
 
int nd_stats_value_index (const ND_STATS *stats, const int *indexes)
 Given a position in the n-d histogram (i,j,k) return the position in the 1-d values array. More...
 
void tpoint_compute_stats (VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc, int sample_rows, double total_rows)
 Compute the statistics for temporal point columns (callback function) More...