MobilityDB 1.1
Data Structures | Macros | Functions
span.h File Reference
#include <postgres.h>
#include <meos.h>
#include "general/meos_catalog.h"
Include dependency graph for span.h:

Go to the source code of this file.

Data Structures

struct  SpanBound
 Basic routines for spans (a.k.a. More...
 

Macros

#define DatumGetSpanP(X)   ((Span *) DatumGetPointer(X))
 
#define DatumGetSpanSetP(X)   ((SpanSet *) DatumGetPointer(X))
 
#define PG_GETARG_SPAN_P(X)   DatumGetSpanP(PG_GETARG_POINTER(X))
 
#define PG_GETARG_SPANSET_P(X)   ((SpanSet *) PG_GETARG_VARLENA_P(X))
 
#define PG_RETURN_SPAN_P(X)   PG_RETURN_POINTER(X)
 
#define PG_RETURN_SPANSET_P(X)   PG_RETURN_POINTER(X)
 
#define SpanPGetDatum(X)   PointerGetDatum(X)
 
#define SpanSetPGetDatum(X)   PointerGetDatum(X)
 

Functions

int span_bound_cmp (const SpanBound *b1, const SpanBound *b2)
 Compare two span boundary points, returning <0, 0, or >0 according to whether the first one is less than, equal to, or greater than the second one. More...
 
int span_bound_qsort_cmp (const void *a1, const void *a2)
 Comparison function for sorting span bounds. More...
 
void span_bounds (const Span *s, double *xmin, double *xmax)
 
void span_deserialize (const Span *s, SpanBound *lower, SpanBound *upper)
 General functions for spans (a.k.a. More...
 
int span_lower_cmp (const Span *a, const Span *b)
 Compare the lower bounds of two spans, returning <0, 0, or >0 according to whether the first bound is less than, equal to, or greater than the second one. More...
 
Spanspan_serialize (SpanBound *lower, SpanBound *upper)
 
uint8_t * span_to_wkb_buf (const Span *s, uint8_t *buf, uint8_t variant)
 Write into the buffer a span represented in Well-Known Binary (WKB) format as follows. More...
 
size_t span_to_wkb_size (const Span *s)
 Return the size in bytes of a span represented in Well-Known Binary (WKB) format. More...
 
int span_upper_cmp (const Span *a, const Span *b)
 Compare the upper bounds of two spans, returning <0, 0, or >0 according to whether the first bound is less than, equal to, or greater than the second one. More...
 
Span ** spanarr_normalize (Span **spans, int count, bool sort, int *newcount)
 Normalize an array of spans. More...