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

Operators for span set types. More...

#include <assert.h>
#include <postgres.h>
#include <utils/timestamp.h>
#include <meos.h>
#include <meos_internal.h>
#include "temporal/span.h"
#include "temporal/spanset.h"
#include "temporal/temporal.h"
#include "temporal/type_util.h"

Functions

bool adjacent_span_spanset (const Span *s, const SpanSet *ss)
 Return true if a span and a span set are adjacent. More...
 
bool adjacent_spanset_span (const SpanSet *ss, const Span *s)
 Return true if a span set and a span are adjacent. More...
 
bool adjacent_spanset_spanset (const SpanSet *ss1, const SpanSet *ss2)
 Return true if two span sets are adjacent. More...
 
bool adjacent_spanset_value (const SpanSet *ss, Datum value)
 Return true if a span set and a value are adjacent. More...
 
bool adjacent_value_spanset (Datum value, const SpanSet *ss)
 Return true if a span set and a value are adjacent. More...
 
bool contained_span_spanset (const Span *s, const SpanSet *ss)
 Return true if a span is contained in a span set. More...
 
bool contained_spanset_span (const SpanSet *ss, const Span *s)
 Return true if a span set is contained in a span set. More...
 
bool contained_spanset_spanset (const SpanSet *ss1, const SpanSet *ss2)
 Return true if the first span set is contained in the second one. More...
 
bool contained_value_spanset (Datum value, const SpanSet *ss)
 Return true if a value is contained in a span set. More...
 
bool contains_span_spanset (const Span *s, const SpanSet *ss)
 Return true if a span contains a span set. More...
 
bool contains_spanset_span (const SpanSet *ss, const Span *s)
 Return true if a span set contains a span. More...
 
bool contains_spanset_spanset (const SpanSet *ss1, const SpanSet *ss2)
 Return true if the first span set contains the second one. More...
 
bool contains_spanset_timestamptz (const SpanSet *ss, TimestampTz t)
 Return true if a span set contains a timestamptz. More...
 
bool contains_spanset_value (const SpanSet *ss, Datum value)
 Return true if a span set contains a value. More...
 
Datum distance_spanset_span (const SpanSet *ss, const Span *s)
 Return the distance between a span set and a span. More...
 
Datum distance_spanset_spanset (const SpanSet *ss1, const SpanSet *ss2)
 Return the distance between two span sets. More...
 
Datum distance_spanset_value (const SpanSet *ss, Datum value)
 Return the distance between a span set and a value. More...
 
SpanSetintersection_span_spanset (const Span *s, const SpanSet *ss)
 Return the intersection of a span and a span set. More...
 
SpanSetintersection_spanset_span (const SpanSet *ss, const Span *s)
 Return the intersection of a span set and a span. More...
 
SpanSetintersection_spanset_spanset (const SpanSet *ss1, const SpanSet *ss2)
 Return the intersection of two span sets. More...
 
SpanSetintersection_spanset_value (const SpanSet *ss, Datum value)
 Return the intersection of a span set and a value. More...
 
SpanSetintersection_value_spanset (Datum value, const SpanSet *ss)
 Return the intersection of a value and a span set. More...
 
bool left_span_spanset (const Span *s, const SpanSet *ss)
 Return true if a span is before a span set. More...
 
bool left_spanset_span (const SpanSet *ss, const Span *s)
 Return true if a span set is to the left a span. More...
 
bool left_spanset_spanset (const SpanSet *ss1, const SpanSet *ss2)
 Return true if the first span set is to the left of the second one. More...
 
bool left_spanset_value (const SpanSet *ss, Datum value)
 Return true if a span set is to the left of a value. More...
 
bool left_value_spanset (Datum value, const SpanSet *ss)
 Return true if a value is to the left of a span set. More...
 
static int mi_span_spanset (const Span *s, const SpanSet *ss, int from, int to, Span *result)
 Return in the last argument the difference of a span and a span set. More...
 
SpanSetminus_span_spanset (const Span *s, const SpanSet *ss)
 Return the difference of a span and a span set. More...
 
SpanSetminus_spanset_span (const SpanSet *ss, const Span *s)
 Return the difference of a span set and a span. More...
 
SpanSetminus_spanset_spanset (const SpanSet *ss1, const SpanSet *ss2)
 Return the difference of two span sets. More...
 
SpanSetminus_spanset_value (const SpanSet *ss, Datum value)
 Return the difference of a span set and a value. More...
 
SpanSetminus_value_spanset (Datum value, const SpanSet *ss)
 Return the difference of a value and a span set. More...
 
bool overlaps_span_spanset (const Span *s, const SpanSet *ss)
 Return true if a span and a span set overlap. More...
 
bool overlaps_spanset_span (const SpanSet *ss, const Span *s)
 Return true if a span set and a span overlap. More...
 
bool overlaps_spanset_spanset (const SpanSet *ss1, const SpanSet *ss2)
 Return true if two span sets overlap. More...
 
bool overleft_span_spanset (const Span *s, const SpanSet *ss)
 Return true if a span does not extend to the right of a span set. More...
 
bool overleft_spanset_span (const SpanSet *ss, const Span *s)
 Return true if a span set does not extend to the right of a span. More...
 
bool overleft_spanset_spanset (const SpanSet *ss1, const SpanSet *ss2)
 Return true if the first span set does not extend to the right of the second one. More...
 
bool overleft_spanset_value (const SpanSet *ss, Datum value)
 Return true if a span set does not extend to the right of a value. More...
 
bool overleft_value_spanset (Datum value, const SpanSet *ss)
 Return true if a value does not extend to the right of a span set. More...
 
bool overright_span_spanset (const Span *s, const SpanSet *ss)
 Return true if a span does not extend to the left of a span set. More...
 
bool overright_spanset_span (const SpanSet *ss, const Span *s)
 Return true if a span set does not extend to the left of a span. More...
 
bool overright_spanset_spanset (const SpanSet *ss1, const SpanSet *ss2)
 Return true if the first span set does not extend to the left of the second one. More...
 
bool overright_spanset_value (const SpanSet *ss, Datum value)
 Return true if a span set does not extend to the left of a value. More...
 
bool overright_value_spanset (Datum value, const SpanSet *ss)
 Return true if a value does not extend to the left of a span set. More...
 
bool right_span_spanset (const Span *s, const SpanSet *ss)
 Return true if a span is to the right of a span set. More...
 
bool right_spanset_span (const SpanSet *ss, const Span *s)
 Return true if a span set is to the right of a span. More...
 
bool right_spanset_spanset (const SpanSet *ss1, const SpanSet *ss2)
 Return true if the first span set is to the right of the second one. More...
 
bool right_spanset_value (const SpanSet *ss, Datum value)
 Return true if a span set is to the right of a value. More...
 
bool right_value_spanset (Datum value, const SpanSet *ss)
 Return true if a value is to the right of a span set. More...
 
SpanSetunion_span_spanset (const Span *s, const SpanSet *ss)
 Return the union of a span and a span set. More...
 
SpanSetunion_spanset_span (const SpanSet *ss, const Span *s)
 Return the union of a span set and a span. More...
 
SpanSetunion_spanset_spanset (const SpanSet *ss1, const SpanSet *ss2)
 Return the union of two span sets. More...
 
SpanSetunion_spanset_value (const SpanSet *ss, Datum value)
 Return the union of a span set and a value. More...
 
SpanSetunion_value_spanset (Datum value, const SpanSet *ss)
 Return the union of a value and a span set. More...
 

Detailed Description

Operators for span set types.