MobilityDB  1.0
Functions
tnumber_distance.c File Reference

Distance functions for temporal numbers. More...

#include "general/tnumber_distance.h"
#include <assert.h>
#include <float.h>
#include <math.h>
#include <utils/builtins.h>
#include <utils/timestamp.h>
#include "general/period.h"
#include "general/timeops.h"
#include "general/rangetypes_ext.h"
#include "general/temporaltypes.h"
#include "general/temporal_util.h"
#include "general/lifting.h"
Include dependency graph for tnumber_distance.c:

Functions

static Datum datum_distance (Datum l, Datum r, Oid typel, Oid typer)
 Returns the distance between the two numbers. More...
 
static Temporaldistance_tnumber_base_internal (const Temporal *temp, Datum value, Oid basetypid, Oid restypid)
 Returns the temporal distance between the temporal number and the value (distpatch function) More...
 
PGDLLEXPORT Datum distance_base_tnumber (PG_FUNCTION_ARGS)
 Returns the temporal distance between the value and the temporal number. More...
 
PGDLLEXPORT Datum distance_tnumber_base (PG_FUNCTION_ARGS)
 Returns the temporal distance between the temporal number and the value. More...
 
static Temporaldistance_tnumber_tnumber_internal (const Temporal *temp1, const Temporal *temp2, Oid restypid)
 Returns the temporal distance between the two temporal points (dispatch function) More...
 
PGDLLEXPORT Datum distance_tnumber_tnumber (PG_FUNCTION_ARGS)
 Returns the temporal distance between the two temporal points. More...
 
static double NAD_tnumber_base_internal (Temporal *temp, Datum value, Oid basetypid)
 Returns the nearest approach distance between the temporal number and the base value (internal function) More...
 
PGDLLEXPORT Datum NAD_base_tnumber (PG_FUNCTION_ARGS)
 Returns the temporal distance between the value and the temporal number. More...
 
PGDLLEXPORT Datum NAD_tnumber_base (PG_FUNCTION_ARGS)
 Returns the temporal distance between the temporal number and the value. More...
 
double NAD_tbox_tbox_internal (const TBOX *box1, const TBOX *box2)
 Returns the nearest approach distance between the temporal boxes (internal function) More...
 
PGDLLEXPORT Datum NAD_tbox_tbox (PG_FUNCTION_ARGS)
 Returns the nearest approach distance between the temporal boxes. More...
 
static double NAD_tnumber_tbox_internal (const Temporal *temp, TBOX *box)
 Returns the nearest approach distance between the temporal number and the temporal box (internal function) More...
 
PGDLLEXPORT Datum NAD_tbox_tnumber (PG_FUNCTION_ARGS)
 Returns the nearest approach distance between the temporal box and the temporal number. More...
 
PGDLLEXPORT Datum NAD_tnumber_tbox (PG_FUNCTION_ARGS)
 Returns the nearest approach distance between the temporal number and the temporal box. More...
 
PGDLLEXPORT Datum NAD_tnumber_tnumber (PG_FUNCTION_ARGS)
 Returns the nearest approach distance between the temporal numbers. More...
 

Detailed Description

Distance functions for temporal numbers.