The ts_tselem structure
A ts_tselem structure is a pointer to one element (row) of a time series.
When you use ts_tselem with a regular time series, the time
stamp column in the element is left as NULL
, allowing
you to avoid the expense of computing the time stamp if it is not
required. The time stamp is computed on demand in the ts_get_col_by_name(), ts_get_col_by_number(),
and ts_get_all_cols() routines. For irregular time
series, the time stamp column is never NULL
.
You can convert a ts_tselem structure to and from an MI_ROW structure with the ts_row_to_elem() and ts_elem_to_row() routines.
If the element was created by the ts_make_elem() or ts_make_elem_with_buf() procedure, you must use the ts_free_elem() procedure to free the memory allocated for a ts_tselem structure.