|
MobilityDB 1.3
|
General aggregate functions for temporal types. More...
#include "temporal/temporal_aggfuncs.h"#include <assert.h>#include <string.h>#include <postgres.h>#include <utils/timestamp.h>#include <meos.h>#include <meos_internal.h>#include "temporal/postgres_types.h"#include "temporal/set.h"#include "temporal/skiplist.h"#include "temporal/span.h"#include "temporal/spanset.h"#include "temporal/temporal_restrict.h"#include "temporal/tbool_ops.h"#include "temporal/tinstant.h"#include "temporal/tsequence.h"#include "temporal/tsequenceset.h"#include "temporal/type_util.h"Functions | |
| Datum | datum_max_float8 (Datum l, Datum r) |
| Return the maximum value of the two arguments. More... | |
| Datum | datum_max_int32 (Datum l, Datum r) |
| Return the maximum value of the two arguments. More... | |
| Datum | datum_max_text (Datum l, Datum r) |
| Return the maximum value of the two arguments. More... | |
| Datum | datum_min_float8 (Datum l, Datum r) |
| Return the minimum value of the two arguments. More... | |
| Datum | datum_min_int32 (Datum l, Datum r) |
| Return the minimum value of the two arguments. More... | |
| Datum | datum_min_text (Datum l, Datum r) |
| Return the minimum value of the two arguments. More... | |
| Datum | datum_sum_double2 (Datum l, Datum r) |
| Return the sum of the two arguments. More... | |
| Datum | datum_sum_double3 (Datum l, Datum r) |
| Return the sum of the two arguments. More... | |
| Datum | datum_sum_double4 (Datum l, Datum r) |
| Return the sum of the two arguments. More... | |
| Datum | datum_sum_float8 (Datum l, Datum r) |
| Return the sum of the two arguments. More... | |
| Datum | datum_sum_int32 (Datum l, Datum r) |
| Return the sum of the two arguments. More... | |
| bool | ensure_same_skiplist_subtype (SkipList *state, uint8 subtype) |
| Temporal ** | skiplist_temporal_values (SkipList *list) |
| Return a copy of the temporal values contained in the skiplist. More... | |
| static int | span_span_cmp (const Span *s1, const Span *s2) |
| Determine the relative position of two periods. More... | |
| static int | span_timestamptz_cmp (const Span *s, TimestampTz t) |
| Determine the relative position of a span and a timestamptz. More... | |
| SkipList * | tcontseq_tagg_transfn (SkipList *state, const TSequence *seq, datum_func2 func, bool crossings) |
| Generic transition function for aggregating temporal values of sequence subtype. More... | |
| TSequence * | tcontseq_transform_tagg (const TSequence *seq, TInstant *(*func)(const TInstant *)) |
| Transform a temporal sequence value for aggregation. More... | |
| static TSequence * | tcontseq_transform_tcount (const TSequence *seq) |
| Transform a temporal sequence value into a temporal integer value for performing temporal count aggregation. More... | |
| SkipList * | tdiscseq_tagg_transfn (SkipList *state, const TSequence *seq, datum_func2 func) |
| Generic transition function for aggregating temporal discrete sequence values. More... | |
| TInstant ** | tdiscseq_transform_tagg (const TSequence *seq, TInstant *(*func)(const TInstant *)) |
| Transform a temporal discrete sequence value for aggregation. More... | |
| static TInstant ** | tdiscseq_transform_tcount (const TSequence *seq) |
| Transform a temporal discrete sequence value into a temporal integer value for performing temporal count aggregation. More... | |
| Temporal * | temporal_app_tinst_transfn (Temporal *state, const TInstant *inst, interpType interp, double maxdist, const Interval *maxt) |
| Transition function for append temporal instant aggregate. More... | |
| Temporal * | temporal_app_tseq_transfn (Temporal *state, const TSequence *seq) |
| Transition function for append temporal sequence aggregate. More... | |
| Span * | temporal_extent_transfn (Span *state, const Temporal *temp) |
| Transition function for temporal extent aggregate of temporal values. More... | |
| int | temporal_skiplist_common (SkipList *list, void **values, int count, int *lower, int *upper, int update[SKIPLIST_MAXLEVEL]) |
| Determine the segment of the list that overlaps with the new set of temporal values. More... | |
| static int | temporal_skiplist_elempos (const SkipList *list, Span *s, int cur) |
| Comparison function used for skiplists. More... | |
| void ** | temporal_skiplist_merge (void **spliced, int spliced_count, void **values, int count, datum_func2 func, bool crossings, int *newcount, void ***tofree, int *nfree) |
| Return the new values obtained by merging the segment of the list that overlaps with the new set of temporal values. More... | |
| void | temporal_skiplist_splice (SkipList *list, void **values, int count, datum_func2 func, bool crossings) |
| Insert a new set of values to the skiplist while performing the aggregation between the new values that overlap with the values in the list. More... | |
| SkipList * | temporal_tagg_combinefn (SkipList *state1, SkipList *state2, datum_func2 func, bool crossings) |
| Generic combine function for aggregating temporal values. More... | |
| Temporal * | temporal_tagg_finalfn (SkipList *state) |
| Generic final function for aggregating temporal values. More... | |
| SkipList * | temporal_tagg_transfn (SkipList *state, const Temporal *temp, datum_func2 func, bool crossings) |
| Generic transition function for aggregating temporal values of sequence set subtype. More... | |
| SkipList * | temporal_tagg_transform_transfn (SkipList *state, const Temporal *temp, datum_func2 func, bool crossings, TInstant *(*transform)(const TInstant *)) |
| Transition function for aggregating temporal values that require a transformation to each composing instant/sequence. More... | |
| SkipList * | temporal_tcount_transfn (SkipList *state, const Temporal *temp) |
| Transition function for temporal count aggregation. More... | |
| Temporal ** | temporal_transform_tagg (const Temporal *temp, int *count, TInstant *(*func)(const TInstant *)) |
| Transform a temporal value for aggregation. More... | |
| Temporal ** | temporal_transform_tcount (const Temporal *temp, int *count) |
| Transform a temporal value into a temporal integer value for performing temporal count aggregation (dispatch function) More... | |
| static TInstant ** | timestamp_transform_tcount (TimestampTz t) |
| Transform a timestamp value into a temporal integer value for performing temporal count aggregation. More... | |
| SkipList * | timestamptz_tcount_transfn (SkipList *state, TimestampTz t) |
| Transition function for temporal count aggregate of timestamps. More... | |
| TInstant ** | tinstant_tagg (TInstant **instants1, int count1, TInstant **instants2, int count2, datum_func2 func, int *newcount, void ***tofree, int *nfree) |
| Generic aggregate function for temporal instants. More... | |
| SkipList * | tinstant_tagg_transfn (SkipList *state, const TInstant *inst, datum_func2 func) |
| Generic transition function for aggregating temporal values of instant subtype. More... | |
| TSequence * | tinstant_tavg_finalfn (TInstant **instants, int count) |
| Final function for temporal average aggregation of temporal instant values. More... | |
| static TInstant * | tinstant_transform_tcount (const TInstant *inst) |
| Transform a temporal instant value into a temporal integer value for performing temporal count aggregation. More... | |
| TBox * | tnumber_extent_transfn (TBox *state, const Temporal *temp) |
| Transition function for temporal extent aggregate of temporal numbers. More... | |
| Temporal * | tnumber_tavg_finalfn (SkipList *state) |
| Final function for temporal average aggregation. More... | |
| TInstant * | tnumberinst_transform_tavg (const TInstant *inst) |
| Transform a temporal number into a temporal double2 value for performing temporal average aggregation. More... | |
| TSequence ** | tsequence_tagg (TSequence **sequences1, int count1, TSequence **sequences2, int count2, datum_func2 func, bool crossings, int *newcount) |
| Generic aggregate function for temporal sequences. More... | |
| static int | tsequence_tagg_iter (const TSequence *seq1, const TSequence *seq2, datum_func2 func, bool crossings, TSequence **result) |
| Generic aggregate function for temporal sequences (iterator function) More... | |
| TSequenceSet * | tsequence_tavg_finalfn (TSequence **sequences, int count) |
| Final function for temporal average aggregation of temporal sequence values. More... | |
| SkipList * | tsequenceset_tagg_transfn (SkipList *state, const TSequenceSet *ss, datum_func2 func, bool crossings) |
| Generic transition function for aggregating temporal values of sequence set subtype. More... | |
| TSequence ** | tsequenceset_transform_tagg (const TSequenceSet *ss, TInstant *(*func)(const TInstant *)) |
| Transform a temporal sequence set for aggregation. More... | |
| static TSequence ** | tsequenceset_transform_tcount (const TSequenceSet *ss) |
| Transform a temporal sequence set value into a temporal integer value for performing temporal count aggregation. More... | |
| SkipList * | tstzset_tcount_transfn (SkipList *state, const Set *s) |
| Transition function for temporal count aggregate of timestamp sets. More... | |
| static TInstant ** | tstzset_transform_tcount (const Set *s) |
| Transform a timestamp set value into a temporal integer value for performing temporal count aggregation. More... | |
| SkipList * | tstzspan_tcount_transfn (SkipList *state, const Span *s) |
| Transition function for temporal count aggregate of timestamptz spans. More... | |
| static TSequence * | tstzspan_transform_tcount (const Span *s) |
| Transform a a timestamptz span into a temporal integer value for performing temporal count aggregation. More... | |
| SkipList * | tstzspanset_tcount_transfn (SkipList *state, const SpanSet *ss) |
| Transition function for temporal count aggregate of timestamptz span sets. More... | |
| static TSequence ** | tstzspanset_transform_tcount (const SpanSet *ss) |
| Transform a timestamptz span set value into a temporal integer value for performing temporal count aggregation. More... | |
General aggregate functions for temporal types.