MobilityDB 1.1
Functions
set.c File Reference
#include "general/set.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/type_out.h"
#include "general/type_parser.h"
#include "general/type_util.h"
#include "point/tpoint_out.h"
#include "point/tpoint_spatialfuncs.h"
#include "npoint/tnpoint_boxops.h"
Include dependency graph for set.c:

Functions

Setbigint_to_bigintset (int64 i)
 Cast a value as a set. More...
 
int64 bigintset_end_value (const Set *s)
 Return the end value of a big integer set. More...
 
Setbigintset_in (const char *str)
 Return a set from its Well-Known Text (WKT) representation. More...
 
int64 bigintset_start_value (const Set *s)
 Return the start value of a big integer set. More...
 
bool bigintset_value_n (const Set *s, int n, int64 *result)
 Return the n-th value of a big integer set. More...
 
int64bigintset_values (const Set *s)
 Return the array of values of a big integer set. More...
 
Setfloat_to_floatset (double d)
 Cast a value as a set. More...
 
double floatset_end_value (const Set *s)
 Return the end value of a float set. More...
 
Setfloatset_in (const char *str)
 Return a set from its Well-Known Text (WKT) representation. More...
 
double floatset_start_value (const Set *s)
 Return the start value of a float set. More...
 
bool floatset_value_n (const Set *s, int n, double *result)
 Return the n-th value of a float set. More...
 
double * floatset_values (const Set *s)
 Return the array of values of a float set. More...
 
char * geoset_as_ewkt (const Set *set, int maxdd)
 Return the Extended Well-Known Text (EWKT) representation a geoset. More...
 
char * geoset_as_text (const Set *set, int maxdd)
 Return the Well-Known Text (WKT) representation a geoset. More...
 
int geoset_srid (const Set *set)
 Return the SRID of a geoset point. More...
 
Setint_to_intset (int i)
 Cast a value as a set. More...
 
int intset_end_value (const Set *s)
 Return the end value of an integer set. More...
 
Setintset_in (const char *str)
 Return a set from its Well-Known Text (WKT) representation. More...
 
int intset_start_value (const Set *s)
 Return the start value of an integer set. More...
 
bool intset_value_n (const Set *s, int n, int *result)
 Return the n-th value of an integer set. More...
 
int * intset_values (const Set *s)
 Return the array of values of an integer set. More...
 
static bool set_basetype_quotes (meosType type)
 Return true if the base type value is output enclosed into quotes. More...
 
void * set_bbox_ptr (const Set *s)
 Return a pointer to the bounding box of a temporal sequence. More...
 
static size_t set_bbox_size (meosType settype)
 Return the size of a bounding box of a temporal type. More...
 
int set_cmp (const Set *s1, const Set *s2)
 Return -1, 0, or 1 depending on whether the first set is less than, equal, or greater than the second one. More...
 
Setset_copy (const Set *s)
 Return a copy of a set. More...
 
Datum set_end_value (const Set *s)
 Return the end value of a set. More...
 
bool set_eq (const Set *s1, const Set *s2)
 Return true if the first set is equal to the second one. More...
 
void set_expand_bbox (Datum d, meosType basetype, void *box)
 Set a bounding box from an array of set values. More...
 
bool set_find_value (const Set *s, Datum d, int *loc)
 General functions for set values composed of an ordered list of distinct values. More...
 
bool set_ge (const Set *s1, const Set *s2)
 Return true if the first set is greater than or equal to the second one. More...
 
bool set_gt (const Set *s1, const Set *s2)
 Return true if the first set is greater than the second one. More...
 
uint32 set_hash (const Set *s)
 Return the 32-bit hash of a set. More...
 
uint64 set_hash_extended (const Set *s, uint64 seed)
 Return the 64-bit hash of a set using a seed. More...
 
Setset_in (const char *str, meosType settype)
 Return a set from its Well-Known Text (WKT) representation. More...
 
bool set_le (const Set *s1, const Set *s2)
 Return true if the first set is less than or equal to the second one. More...
 
bool set_lt (const Set *s1, const Set *s2)
 Return true if the first set is less than the second one. More...
 
Setset_make (const Datum *values, int count, meosType basetype, bool ordered)
 Construct a set from an array of values. More...
 
Setset_make_exp (const Datum *values, int count, int maxcount, meosType basetype, bool ordered)
 Construct a set from an array of values. More...
 
Setset_make_free (Datum *values, int count, meosType basetype, bool ordered)
 Construct a set from the array of values and free the array after the creation. More...
 
int set_mem_size (const Set *s)
 Return the size in bytes of a set. More...
 
bool set_ne (const Set *s1, const Set *s2)
 Return true if the first set is different from the second one. More...
 
int set_num_values (const Set *s)
 Return the number of values of a set. More...
 
size_t * set_offsets_ptr (const Set *s)
 Return a pointer to the offsets array of a set. More...
 
char * set_out (const Set *s, int maxdd)
 Return the Well-Known Text (WKT) representation of a set. More...
 
char * set_out_fn (const Set *s, int maxdd, outfunc value_out)
 Return the Well-Known Text (WKT) representation of a set. More...
 
void set_set_span (const Set *set, Span *s)
 Set the last argument to the bounding span of a set. More...
 
Setset_shift (const Set *s, Datum shift)
 Shift the values of set. More...
 
Datum set_start_value (const Set *s)
 Return the start value of a set. More...
 
Spanset_to_span (const Set *s)
 Return the bounding span of a set. More...
 
Datum set_val_n (const Set *s, int index)
 Return the n-th value of a set. More...
 
bool set_value_n (const Set *s, int n, Datum *result)
 Return the n-th value of a set. More...
 
Datumset_values (const Set *s)
 Return the array of values of a set. More...
 
void spatialset_set_stbox (const Set *set, STBox *box)
 Set the last argument to the bounding box of a spatial set. More...
 
STBoxspatialset_to_stbox (const Set *s)
 Return the bounding box of a spatial set. More...
 
Settimestamp_to_tstzset (TimestampTz t)
 Cast a value as a set. More...
 
TimestampTz tstzset_end_timestamp (const Set *ts)
 Return the end value of a set. More...
 
Settstzset_in (const char *str)
 Return a set from its Well-Known Text (WKT) representation. More...
 
Settstzset_shift_tscale (const Set *s, const Interval *shift, const Interval *duration)
 Return a timestamp set uned and/or scaled by the intervals. More...
 
TimestampTz tstzset_start_timestamp (const Set *ts)
 Return the start value of a set. More...
 
bool tstzset_timestamp_n (const Set *ts, int n, TimestampTz *result)
 Return the n-th value of a set. More...
 
TimestampTztstzset_timestamps (const Set *ts)
 Return the array of timestamps of a set. More...
 
Setvalue_to_set (Datum d, meosType basetype)
 Cast a value as a set. More...
 
void valuearr_compute_bbox (const Datum *values, meosType basetype, int count, void *box)
 Set a bounding box from an array of set values. More...