MobilityDB 1.3
Loading...
Searching...
No Matches

◆ set_make_exp()

Set * set_make_exp ( const Datum values,
int  count,
int  maxcount,
meosType  basetype,
bool  order 
)

Return a set from an array of values enabling the data structure to expand.

The memory structure depends on whether the value is passed by value or by reference. For example, the memory structure of a set with two values passed by value and passed by reference are, respectively, as follows

--------------------------------------------------------------------------
| Header | count | maxcount | bboxsize | ( bbox )_X | Value_0 | Value_1 |
--------------------------------------------------------------------------
----------------------------------------------------------------------
| Header | count | maxcount | bboxsize | ( bbox )_X | offset_0 | ...
----------------------------------------------------------------------
-------------------------------------
... | offset_1 | Value_0 | Value_1 |
-------------------------------------

where

  • Header contains internal information (size, type identifiers, flags)
  • count is the number of current values
  • max count is the maximum number of values
  • bboxsize is the size of the bounding box
  • bbox is the bounding box and X are unused bytes added for double padding.
  • offset_i are offsets from the begining of the struct for the values
Parameters
[in]valuesArray of values
[in]countNumber of elements in the array
[in]maxcountMaximum number of elements in the array
[in]basetypeType of the values
[in]orderTrue when the values should be ordered and duplicates should be removed