MobilityDB 1.3
Loading...
Searching...
No Matches
Functions
tcbuffer.c File Reference

Basic functions for temporal circular buffers. More...

#include <assert.h>
#include <limits.h>
#include <liblwgeom_internal.h>
#include <meos.h>
#include <meos_internal_geo.h>
#include "temporal/tnumber_mathfuncs.h"
#include "temporal/type_util.h"
#include "geo/tgeo_spatialfuncs.h"
#include "geo/tspatial_parser.h"
#include "cbuffer/cbuffer.h"

Functions

bool ensure_valid_tcbuffer_cbuffer (const Temporal *temp, const Cbuffer *cb)
 Return true if a temporal circular buffer and a circular buffer are valid for operations. More...
 
bool ensure_valid_tcbuffer_geo (const Temporal *temp, const GSERIALIZED *gs)
 Ensure the validity of a temporal circular buffer and a geometry. More...
 
bool ensure_valid_tcbuffer_stbox (const Temporal *temp, const STBox *box)
 Ensure the validity of a temporal circular buffer and a spatiotemporal box. More...
 
bool ensure_valid_tcbuffer_tcbuffer (const Temporal *temp1, const Temporal *temp2)
 Return true if a temporal circular buffer and a circular buffer are valid for operations. More...
 
Temporaltcbuffer_at_cbuffer (const Temporal *temp, const Cbuffer *cb)
 Return a temporal circular buffer restricted to a circular buffer. More...
 
Temporaltcbuffer_at_geom (const Temporal *temp, const GSERIALIZED *gs)
 Return a temporal circular buffer restricted to a geometry. More...
 
Temporaltcbuffer_at_stbox (const Temporal *temp, const STBox *box, bool border_inc)
 Return a temporal circular buffer restricted to a spatiotemporal box. More...
 
Cbuffertcbuffer_end_value (const Temporal *temp)
 Return a copy of the end value of a temporal circular buffer. More...
 
Temporaltcbuffer_expand (const Temporal *temp, double dist)
 Return a temporal circular buffer with the radius expanded by a distance. More...
 
Temporaltcbuffer_in (const char *str)
 Return a temporal circular buffer from its Well-Known Text (WKT) representation. More...
 
Temporaltcbuffer_make (const Temporal *tpoint, const Temporal *tfloat)
 Return a temporal circular buffer from a temporal point and a temporal float @csqlfn Tcbuffer_constructor() More...
 
static Settcbuffer_members (const Temporal *temp, bool point)
 Return the points or radii or radius of a temporal circular buffer @csqlfn Tcbuffer_points() More...
 
Temporaltcbuffer_minus_cbuffer (const Temporal *temp, const Cbuffer *cb)
 Return a temporal circular buffer restricted to the complement of a circular buffer. More...
 
Temporaltcbuffer_minus_geom (const Temporal *temp, const GSERIALIZED *gs)
 Return a temporal circular buffer restricted to the complement of a geometry. More...
 
Temporaltcbuffer_minus_stbox (const Temporal *temp, const STBox *box, bool border_inc)
 Return a temporal circular buffer restricted to the complement of a geometry. More...
 
Settcbuffer_points (const Temporal *temp)
 Return the array of points or radius of a temporal circular buffer @csqlfn Tcbuffer_points() More...
 
Settcbuffer_radius (const Temporal *temp)
 Return the array of radii of a temporal circular buffer @csqlfn Tcbuffer_points() More...
 
Temporaltcbuffer_restrict_cbuffer (const Temporal *temp, const Cbuffer *cb, bool atfunc)
 Return a temporal circular buffer restricted to a circular buffer. More...
 
Temporaltcbuffer_restrict_geom (const Temporal *temp, const GSERIALIZED *gs, bool atfunc)
 Return a temporal circular buffer restricted to a geometry. More...
 
Temporaltcbuffer_restrict_stbox (const Temporal *temp, const STBox *box, bool border_inc UNUSED, bool atfunc)
 Return a temporal circular buffer restricted to a spatiotemporal box. More...
 
Cbuffertcbuffer_start_value (const Temporal *temp)
 Return a copy of the start value of a temporal circular buffer. More...
 
Temporaltcbuffer_to_tfloat (const Temporal *temp)
 Return a temporal float constructed from the radius of a temporal circular buffer. More...
 
Temporaltcbuffer_to_tgeompoint (const Temporal *temp)
 Return a temporal geometry point constructed from the points of a temporal circular buffer. More...
 
bool tcbuffer_value_at_timestamptz (const Temporal *temp, TimestampTz t, bool strict, Cbuffer **value)
 Return the value of a temporal circular buffer at a timestamptz. More...
 
bool tcbuffer_value_n (const Temporal *temp, int n, Cbuffer **result)
 Return a copy of the n-th value of a temporal circular buffer. More...
 
Cbuffer ** tcbuffer_values (const Temporal *temp, int *count)
 Return the array of copies of base values of a temporal circular buffer. More...
 
TInstanttcbufferinst_in (const char *str)
 Return a temporal circular buffer instant from its Well-Known Text (WKT) representation. More...
 
TInstanttcbufferinst_make (const TInstant *inst1, const TInstant *inst2)
 Return a temporal circular buffer from a temporal point and a temporal float. More...
 
static Settcbufferinst_members (const TInstant *inst, bool point)
 Return the points or radii of a temporal circular buffer. More...
 
TInstanttcbufferinst_tfloatinst (const TInstant *inst)
 Return a temporal float constructed from the radius of a temporal circular buffer. More...
 
TInstanttcbufferinst_tgeompointinst (const TInstant *inst)
 Return a temporal geometry point constructed from the points of a temporal circular buffer. More...
 
static double tcbuffersegm_distance_at_time (double dx0, double dy0, double vx, double vy, double r0, double vr, double t)
 Compute the temporal distance between two circular buffers at time t. More...
 
int tcbuffersegm_distance_turnpt (Datum start1, Datum end1, Datum start2, Datum end2, Datum dist UNUSED, TimestampTz lower, TimestampTz upper, TimestampTz *t1, TimestampTz *t2)
 Return 1 or 2 if two temporal circular buffer segments are at a minimum distance during the period defined by the output timestamps, return 0 otherwise. More...
 
int tcbuffersegm_dwithin_turnpt (Datum start1, Datum end1, Datum start2, Datum end2, Datum dist, TimestampTz lower, TimestampTz upper, TimestampTz *t1, TimestampTz *t2)
 Return 1 or 2 if two temporal circular buffer segments are within a distance during the period defined by the output timestampos, return 0 otherwise. More...
 
int tcbuffersegm_intersection (Datum start1, Datum end1, Datum start2, Datum end2, TimestampTz lower, TimestampTz upper, TimestampTz *t1, TimestampTz *t2)
 Return 1 or 2 if two temporal circular buffer segments intersect during the period defined by the output timestamps, return 0 otherwise. More...
 
int tcbuffersegm_intersection_value (Datum start, Datum end, Datum value, TimestampTz lower, TimestampTz upper, TimestampTz *t1, TimestampTz *t2)
 Return 1 or 2 if a temporal circular buffer segment and a circular buffer intersect during the period defined by the output timestamps, return 0 otherwise. More...
 
TSequencetcbufferseq_in (const char *str, interpType interp UNUSED)
 Return a temporal circular buffer sequence from its Well-Known Text (WKT) representation. More...
 
TSequencetcbufferseq_make (const TSequence *seq1, const TSequence *seq2)
 Return a temporal circular buffer from a temporal point and a temporal float. More...
 
static Settcbufferseq_members (const TSequence *seq, bool point)
 Return the points or radii of a temporal circular buffer. More...
 
TSequencetcbufferseq_tfloatseq (const TSequence *seq)
 Return a temporal float constructed from the radius of a temporal circular buffer. More...
 
TSequencetcbufferseq_tgeompointseq (const TSequence *seq)
 Return a temporal geometry point constructed from the points of a temporal circular buffer. More...
 
TSequenceSettcbufferseqset_in (const char *str)
 Return a temporal circular buffer sequence set from its Well-Known Text (WKT) representation. More...
 
TSequenceSettcbufferseqset_make (const TSequenceSet *ss1, const TSequenceSet *ss2)
 Return a temporal circular buffer from a temporal point and a temporal float. More...
 
static Settcbufferseqset_members (const TSequenceSet *ss, bool point)
 Return the points or radii of a temporal circular buffer. More...
 
TSequenceSettcbufferseqset_tfloatseqset (const TSequenceSet *ss)
 Return a temporal float constructed from the radius of a temporal circular buffer. More...
 
TSequenceSettcbufferseqset_tgeompointseqset (const TSequenceSet *ss)
 Return a temporal geometry point constructed from the points of a temporal circular buffer. More...
 
Temporaltgeometry_to_tcbuffer (const Temporal *temp)
 Convert a temporal geometry into a temporal circular buffer. More...
 
TInstanttgeominst_tcbufferinst (const TInstant *inst)
 Convert a temporal geometry into a temporal circular buffer. More...
 
TSequencetgeomseq_tcbufferseq (const TSequence *seq)
 Convert a temporal geometry into a temporal circular buffer. More...
 
TSequenceSettgeomseqset_tcbufferseqset (const TSequenceSet *ss)
 Convert a temporal geometry into a temporal circular buffer. More...
 

Detailed Description

Basic functions for temporal circular buffers.