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

A simple program that generates a given number of ttext instants, appends the instant into a sequence set where each sequence of the sequence set has a fixed number of instants defined by a compiler constant. More...

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

Macros

#define COMPACT_COMP_SEQS   true
 
#define DEBUG   false
 
#define EXPAND_SEQ   true
 
#define INITIAL_INSTANTS_SEQ   64
 
#define INITIAL_SEQUENCES_SEQSET   64
 
#define MAX_INSTANTS   50000000
 
#define MAX_INSTANTS_SEQ   50000
 
#define MAX_LENGTH_TEXT   10
 
#define NO_INSTANTS_BATCH   50000
 

Functions

int main (void)
 

Detailed Description

A simple program that generates a given number of ttext instants, appends the instant into a sequence set where each sequence of the sequence set has a fixed number of instants defined by a compiler constant.

The program outputs the number of sequences and, for the last sequence, the number of instants and the last value.

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 ttext_expand ttext_expand.c -L/usr/local/lib -lmeos

The output of the program when MEOS is built with the flag -DDEBUG_EXPAND=1 to show debug messages for the expandable data structures is as follows

Total number of instants generated: 50000
Maximum number of instants in a sequence: 500
Generating the instants (one '*' marker every 100 instants)
* Seq -> 128 * Seq -> 256 * Seq -> 512 *************************************
* SS -> 128 ****************************************************************
Number of instants in the sequence set: 50000
Number of sequences: 100, Maximum number of sequences : 128
Number of instants in the last sequence: 500, Last value : BBBBBBBBB
The program took 0.000000 seconds to execute
set(CBUFFER_SRCS cbuffer.c tcbuffer.c tcbuffer_boxops.c tcbuffer_compops.c tcbuffer_distance.c tcbuffer_spatialfuncs.c tcbuffer_spatialrels.c tcbuffer_tempspatialrels.c) if(1) list(APPEND CBUFFER_SRCS cbufferset_meos.c) endif() add_library(cbuffer OBJECT $
Definition: CMakeLists.txt:1