34#ifndef __TSEQUENCE_H__
35#define __TSEQUENCE_H__
40#include "general/temporal.h"
41#include "general/span.h"
50 bool lower_inc,
bool upper_inc,
interpType interp);
52 bool lower_inc,
bool upper_inc,
interpType interp,
bool normalize);
54 int *countseqs,
int count,
int totalseqs);
59 bool *removelast,
bool *removefirst);
61 bool removelast,
bool removefirst);
65 int count,
int *totalcount);
98 bool component,
outfunc value_out);
meosType
Enumeration that defines the built-in and temporal types used in MobilityDB.
Definition: meos_catalog.h:53
char *(* outfunc)(Datum value, meosType type, int maxdd)
Definition: temporal.h:358
int tcontseq_minus_timestamp1(const TSequence *seq, TimestampTz t, TSequence **result)
Restrict a temporal sequence to the complement of a timestamp.
Definition: tsequence.c:4689
TSequence * tsequence_make1(const TInstant **instants, int count, bool lower_inc, bool upper_inc, interpType interp, bool normalize)
Construct a temporal sequence from an array of temporal instants.
Definition: tsequence.c:899
int tnumbercontseq_restrict_spanset1(const TSequence *seq, const SpanSet *ss, bool atfunc, TSequence **result)
Restrict a temporal number to (the complement of) an array of spans of base values.
Definition: tsequence.c:4205
TSequence ** tseqarr2_to_tseqarr(TSequence ***sequences, int *countseqs, int count, int totalseqs)
Convert an array of arrays of temporal sequences into an array of temporal sequences.
Definition: tsequence.c:530
bool tsequence_join_test(const TSequence *seq1, const TSequence *seq2, bool *removelast, bool *removefirst)
Test whether two sequences can be joined during normalization.
Definition: tsequence.c:304
int tcontseq_minus_periodset1(const TSequence *seq, const SpanSet *ps, int from, TSequence **result)
Restrict a temporal sequence to the complement of a period set.
Definition: tsequence.c:5188
bool intersection_tdiscseq_tdiscseq(const TSequence *is1, const TSequence *is2, TSequence **inter1, TSequence **inter2)
Temporally intersect two temporal discrete sequences.
Definition: tsequence.c:2735
int tdiscseq_find_timestamp(const TSequence *seq, TimestampTz t)
Return the index of a timestamp in a temporal discrete sequence value using binary search.
Definition: tsequence.c:495
int tcontseq_minus_period1(const TSequence *seq, const Span *p, TSequence **result)
Restrict a temporal sequence to the complement of a period.
Definition: tsequence.c:5076
TSequence ** tsequence_merge_array1(const TSequence **sequences, int count, int *totalcount)
Merge an array of temporal sequences.
Definition: tsequence.c:1648
char * tsequence_to_string(const TSequence *seq, int maxdd, bool component, outfunc value_out)
Return the Well-Known Text (WKT) representation of a temporal sequence.
Definition: tsequence.c:667
void tsequence_make_valid1(const TInstant **instants, int count, bool lower_inc, bool upper_inc, interpType interp)
Ensure the validity of the arguments when creating a temporal sequence.
Definition: tsequence.c:718
bool intersection_tinstant_tsequence(const TInstant *inst, const TSequence *seq, TInstant **inter1, TInstant **inter2)
Temporally intersect two temporal values.
Definition: tsequence.c:3071
int tstepseq_tlinearseq1(const TSequence *seq, TSequence **result)
bool intersection_tdiscseq_tcontseq(const TSequence *is, const TSequence *seq2, TSequence **inter1, TSequence **inter2)
Temporally intersect two temporal values.
Definition: tsequence.c:2822
int tsequence_values1(const TSequence *seq, Datum *result)
bool synchronize_tsequence_tsequence(const TSequence *seq1, const TSequence *seq2, TSequence **sync1, TSequence **sync2, bool interpoint)
Synchronize two temporal sequences.
Definition: tsequence.c:2600
bool tlinearsegm_intersection_value(const TInstant *inst1, const TInstant *inst2, Datum value, meosType basetype, Datum *inter, TimestampTz *t)
Return true if the segment of a temporal sequence intersects the base value at the timestamp.
Definition: tsequence.c:2894
int tnumbercontseq_restrict_span2(const TSequence *seq, const Span *span, bool atfunc, TSequence **result)
Restrict a temporal number to (the complement of) a span.
Definition: tsequence.c:4113
int tsequence_segments1(const TSequence *seq, TSequence **result)
Return the array of segments of a temporal sequence.
Definition: tsequence.c:2310
TInstant * tsegment_at_timestamp(const TInstant *inst1, const TInstant *inst2, bool linear, TimestampTz t)
Restrict the segment of a temporal sequence to a timestamp.
Definition: tsequence.c:4625
TSequence ** tseqarr_normalize(const TSequence **sequences, int count, int *newcount)
Normalize the array of temporal sequences.
Definition: tsequence.c:1605
int tsequence_timestamps1(const TSequence *seq, TimestampTz *result)
Return the array of timestamps of a temporal sequence.
Definition: tsequence.c:2416
int tsequence_at_values1(const TSequence *seq, const Set *set, TSequence **result)
Restrict a temporal sequence to an array of base values.
Definition: tsequence.c:3688
TSequence * tsequence_join(const TSequence *seq1, const TSequence *seq2, bool removelast, bool removefirst)
Join two temporal sequences.
Definition: tsequence.c:402
int tcontseq_at_periodset1(const TSequence *seq, const SpanSet *ps, TSequence **result)
Restrict a temporal sequence to a period set.
Definition: tsequence.c:5136
int tcontseq_restrict_value1(const TSequence *seq, Datum value, bool atfunc, TSequence **result)
Restrict a temporal sequence to (the complement of) a base value.
Definition: tsequence.c:3602
bool intersection_tsequence_tinstant(const TSequence *seq, const TInstant *inst, TInstant **inter1, TInstant **inter2)
Temporally intersect two temporal sequences.
Definition: tsequence.c:3051
int tcontseq_find_timestamp(const TSequence *seq, TimestampTz t)
Basic functions for temporal sequences.
Definition: tsequence.c:449
Datum tsegment_value_at_timestamp(const TInstant *inst1, const TInstant *inst2, bool linear, TimestampTz t)
Return the base value of the segment of a temporal sequence at a timestamp.
Definition: tsequence.c:2453
int tfloatseq_spans(const TSequence *seq, Span **result)
Return the float spans of a temporal float.
Definition: tsequence.c:2078
int tcontseq_minus_timestampset1(const TSequence *seq, const Set *s, TSequence **result)
Restrict a temporal sequence to the complement of a timestamp set.
Definition: tsequence.c:4855
bool tsegment_intersection(const TInstant *start1, const TInstant *end1, bool linear1, const TInstant *start2, const TInstant *end2, bool linear2, Datum *inter1, Datum *inter2, TimestampTz *t)
Return true if two segments of a temporal sequence intersect at a timestamp.
Definition: tsequence.c:3000
bool intersection_tcontseq_tdiscseq(const TSequence *seq1, const TSequence *seq2, TSequence **inter1, TSequence **inter2)
Temporally intersect two temporal sequences.
Definition: tsequence.c:2781
interpType
Enumeration that defines the interpolation types used in MobilityDB.
Definition: meos.h:124
set(MOBILITYDB_MODULE_PATHNAME "$libdir/lib${MOBILITYDB_LIB_NAME}") set(extschema "@extschema@") configure_file(mobilitydb.control $
Definition: CMakeLists.txt:1
int64 TimestampTz
Definition: pg_ext_defs.in.h:19
uintptr_t Datum
Definition: pg_ext_defs.in.h:4
API of the Mobility Engine Open Source (MEOS) library.
Definition: meos.h:56
Structure to represent span sets.
Definition: meos.h:83
Structure to represent spans (a.k.a.
Definition: meos.h:70
Structure to represent temporal values of instant subtype.
Definition: meos.h:148
Structure to represent temporal values of instant set or sequence subtype.
Definition: meos.h:165