MobilityDB 1.3
Loading...
Searching...
No Matches
Macros | Functions
tbl_temporal_temporal.c File Reference

A simple program that reads a CSV files containing temporal values and performs a "self join" by applying to them an operation. More...

#include <float.h>
#include <stdio.h>
#include <stdlib.h>
#include <meos.h>
#include <meos_internal.h>
#include <meos_geo.h>

Macros

#define MAX_LENGTH_HEADER   1024
 
#define MAX_LENGTH_TEMP   8192
 

Functions

int main (void)
 

Detailed Description

A simple program that reads a CSV files containing temporal values and performs a "self join" by applying to them an operation.

The corresponding SQL query would be

SELECT t1.k, t2.k, numInstants(t1.temp <-> t2.temp))
FROM tbl_tfloat t1, tbl_tfloat t2
WHERE t1.temp <-> t2.temp IS NOT NULL;

The program can be tested with several functions such as ever/alwayas and temporal comparisons ever_eq, always_eq, teq_, ..., ever_lt, always_lt, tlt_, ...

The program can be build as follows

gcc -Wall -g -I/usr/local/include -o tbl_temporal_temporal tbl_temporal_temporal.c -L/usr/local/lib -lmeos