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

A simple program that generates a given number of tfloat instants, appends each generated instant into an output sequence, automatically expanding the sequence if no more free space is available, and at the end outputs the number of instants and the time-weighted average. More...

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <meos.h>
#include <meos_internal.h>

Macros

#define MAX_INSTANTS   1000000
 

Functions

int main (void)
 

Detailed Description

A simple program that generates a given number of tfloat instants, appends each generated instant into an output sequence, automatically expanding the sequence if no more free space is available, and at the end outputs the number of instants and the time-weighted average.

This program and the program tfloat_expand.c in the same directory can be used to compare the two alternative strategies for (1) assembling the sequence at the end from the input instants (2) expanding the sequence at each input instant

The instants are generated so they are not redundant, that is, all input instants will appear in the final sequence.

The program can be build as follows

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