MobilityDB 1.1
Functions
spanset.c File Reference
#include "general/spanset.h"
#include <assert.h>
#include <postgres.h>
#include <utils/timestamp.h>
#include <meos.h>
#include <meos_internal.h>
#include "general/pg_types.h"
#include "general/span.h"
#include "general/type_parser.h"
#include "general/type_util.h"
Include dependency graph for spanset.c:

Functions

SpanSetbigint_to_bigintspanset (int i)
 Cast an element as a span set. More...
 
SpanSetbigintspanset_in (const char *str)
 Return a big integer span from its Well-Known Text (WKT) representation. More...
 
int bigintspanset_lower (const SpanSet *ss)
 Return the lower bound of an integer span set. More...
 
char * bigintspanset_out (const SpanSet *ss)
 Return the Well-Known Text (WKT) representation of a span set. More...
 
int bigintspanset_upper (const SpanSet *ss)
 Return the upper bound of an integer span set. More...
 
SpanSetfloat_to_floaspanset (double d)
 Cast an element as a span set. More...
 
SpanSetfloatspanset_in (const char *str)
 Return a float span from its Well-Known Text (WKT) representation. More...
 
double floatspanset_lower (const SpanSet *ss)
 Return the lower bound of a float span set. More...
 
char * floatspanset_out (const SpanSet *ss, int maxdd)
 Return the Well-Known Text (WKT) representation of a span set. More...
 
double floatspanset_upper (const SpanSet *ss)
 Return the upper bound of a float span set. More...
 
SpanSetint_to_intspanset (int i)
 Cast an element as a span set. More...
 
SpanSetintspanset_in (const char *str)
 Return an integer span from its Well-Known Text (WKT) representation. More...
 
int intspanset_lower (const SpanSet *ss)
 Return the lower bound of an integer span set. More...
 
char * intspanset_out (const SpanSet *ss)
 Return the Well-Known Text (WKT) representation of a span set. More...
 
int intspanset_upper (const SpanSet *ss)
 Return the upper bound of an integer span set. More...
 
Intervalperiodset_duration (const SpanSet *ps, bool boundspan)
 Return the duration of a period set. More...
 
TimestampTz periodset_end_timestamp (const SpanSet *ps)
 Return the end timestamp of a period set. More...
 
bool periodset_find_timestamp (const SpanSet *ps, TimestampTz t, int *loc)
 
SpanSetperiodset_in (const char *str)
 Return a period set from its Well-Known Text (WKT) representation. More...
 
TimestampTz periodset_lower (const SpanSet *ps)
 Return the lower bound of a period. More...
 
int periodset_num_timestamps (const SpanSet *ps)
 Return the number of timestamps of a period set. More...
 
char * periodset_out (const SpanSet *ss)
 Return the Well-Known Text (WKT) representation of a span set. More...
 
SpanSetperiodset_shift_tscale (const SpanSet *ps, const Interval *shift, const Interval *duration)
 Return a period set shifted and/or scaled by the intervals. More...
 
TimestampTz periodset_start_timestamp (const SpanSet *ps)
 Return the start timestamp of a period set. More...
 
bool periodset_timestamp_n (const SpanSet *ps, int n, TimestampTz *result)
 Return the n-th timestamp of a period set. More...
 
TimestampTzperiodset_timestamps (const SpanSet *ps, int *count)
 Return the timestamps of a period set. More...
 
TimestampTz periodset_upper (const SpanSet *ps)
 Return the upper bound of a period. More...
 
SpanSetset_to_spanset (const Set *s)
 Cast a set as a span set. More...
 
SpanSetspan_to_spanset (const Span *s)
 Cast a period as a period set. More...
 
int spanset_cmp (const SpanSet *ss1, const SpanSet *ss2)
 Return -1, 0, or 1 depending on whether the first span set is less than, equal, or greater than the second one. More...
 
SpanSetspanset_copy (const SpanSet *ps)
 Return a copy of a span set. More...
 
Spanspanset_end_span (const SpanSet *ss)
 Return the end span of a span set. More...
 
bool spanset_eq (const SpanSet *ss1, const SpanSet *ss2)
 Return true if the first span set is equal to the second one. More...
 
bool spanset_find_value (const SpanSet *ss, Datum v, int *loc)
 General functions for set of disjoint spans. More...
 
bool spanset_ge (const SpanSet *ss1, const SpanSet *ss2)
 Return true if the first span set is greater than or equal to the second one. More...
 
bool spanset_gt (const SpanSet *ss1, const SpanSet *ss2)
 Return true if the first span set is greater than the second one. More...
 
uint32 spanset_hash (const SpanSet *ps)
 Return the 32-bit hash value of a span set. More...
 
uint64 spanset_hash_extended (const SpanSet *ps, uint64 seed)
 Return the 64-bit hash value of a span set using a seed. More...
 
SpanSetspanset_in (const char *str, meosType spansettype)
 Return a span set from its Well-Known Text (WKT) representation. More...
 
bool spanset_le (const SpanSet *ss1, const SpanSet *ss2)
 Return true if the first span set is less than or equal to the second one. More...
 
bool spanset_lower_inc (const SpanSet *ss)
 Return true if the lower bound of a span set is inclusive. More...
 
bool spanset_lt (const SpanSet *ss1, const SpanSet *ss2)
 Return true if the first span set is less than the second one. More...
 
SpanSetspanset_make (const Span **spans, int count, bool normalize)
 Construct a span set from an array of disjoint span. More...
 
SpanSetspanset_make_free (Span **spans, int count, bool normalize)
 Construct a span set from an array of spans and free the array and the spans after the creation. More...
 
int spanset_mem_size (const SpanSet *ss)
 Return the size in bytes of a period set. More...
 
bool spanset_ne (const SpanSet *ss1, const SpanSet *ss2)
 Return true if the first span set is different from the second one. More...
 
int spanset_num_spans (const SpanSet *ss)
 Return the number of spans of a span set. More...
 
char * spanset_out (const SpanSet *ss, int maxdd)
 Return the Well-Known Text (WKT) representation of a span set. More...
 
void spanset_shift (SpanSet *ss, Datum shift)
 Shift a span set by a value. More...
 
const Spanspanset_sp_n (const SpanSet *ss, int index)
 Return the n-th span of a span set. More...
 
Spanspanset_span_n (const SpanSet *ss, int i)
 Return the n-th span of a span set. More...
 
const Span ** spanset_spans (const SpanSet *ss, int *count)
 Return the spans of a span set. More...
 
Spanspanset_start_span (const SpanSet *ss)
 Return the start span of a span set. More...
 
Spanspanset_to_span (const SpanSet *ss)
 Return the bounding span of a span set. More...
 
bool spanset_upper_inc (const SpanSet *ss)
 Return true if the upper bound of a span set is inclusive. More...
 
double spanset_width (const SpanSet *ss)
 Return the width of a span set as a double. More...
 
SpanSettimestamp_to_periodset (TimestampTz t)
 Cast a timestamp as a period set. More...
 
SpanSetvalue_to_spanset (Datum d, meosType basetype)
 Cast an element as a span set. More...