MobilityDB  1.0

◆ tsequence_make()

TSequence* tsequence_make ( const TInstant **  instants,
int  count,
bool  lower_inc,
bool  upper_inc,
bool  linear,
bool  normalize 
)

Construct a temporal sequence value from the array of temporal instant values.

For example, the memory structure of a temporal sequence value with 2 instants and a precomputed trajectory is as follows:

-------------------------------------------------------------------
( TSequence )_X | offset_0 | offset_1 | offset_2 | offset_3 | ...
-------------------------------------------------------------------
------------------------------------------------------------------------
( TInstant_0 )_X | ( TInstant_1 )_X | ( bbox )_X | ( Traj )_X |
------------------------------------------------------------------------

where the X are unused bytes added for double padding, offset_0 and offset_1 are offsets for the corresponding instants, offset_2 is the offset for the bounding box and offset_3 is the offset for the precomputed trajectory. Precomputed trajectories are only kept for temporal points of sequence type.

Parameters
[in]instantsArray of instants
[in]countNumber of elements in the array
[in]lower_inc,upper_incTrue when the respective bound is inclusive
[in]linearTrue when the interpolation is linear
[in]normalizeTrue when the resulting value should be normalized