Hermes
|
#include <postgres.h>
#include <fmgr.h>
#include <utils/timestamp.h>
Macros | |
#define | HE_FS_INT64 "%lld" |
#define | HE_FS_UINT64 "%llu" |
#define | ELIMINATE_MINUS_ZERO(n) ((n) == (0.0) ? (0.0) : (n)) |
#define | getmsgTimestampHermes(msg) (pq_getmsgfloat8((msg))) |
#define | sendTimestampHermes(buf, t) (pq_sendfloat8((buf), (ELIMINATE_MINUS_ZERO((t))))) |
#define | getmsgTimeOffsetHermes(msg) (pq_getmsgfloat8((msg))) |
#define | sendTimeOffsetHermes(buf, t) (pq_sendfloat8((buf), (ELIMINATE_MINUS_ZERO((t))))) |
Functions | |
int | asprintfHermes (char **ptr, const char *frm,...) |
Timestamp | epoch () |
float8 | interval2seconds (const Interval *interval) |
Function converting the interval to seconds. More... | |
Interval * | seconds2interval (float8 seconds, Interval *result) |
Function converting the interval to seconds in its place. More... | |
float8 | timestamp2seconds (Timestamp ts) |
Function converting timestamp to seconds. More... | |
Timestamp | seconds2timestamp (float8 seconds) |
Function converting seconds to timestamp. More... | |
Timestamp | timestampPlusSeconds (Timestamp ts, float8 seconds) |
Timestamp | timestampMinusSeconds (Timestamp ts, float8 seconds) |
Interval * | differenceInInterval (Timestamp tsA, Timestamp tsB, Interval *result) |
float8 | differenceInSeconds (Timestamp tsA, Timestamp tsB) |
Timestamp | roundTimestamp (Timestamp ts) |
PGDLLEXPORT Datum | roundTimestampV1 (PG_FUNCTION_ARGS) |
float8 | Pi () |
float8 | dPi () |
float8 | radians2degrees (float8 rad) |
float8 | degrees2radians (float8 deg) |
float8 | degrees360 (float8 degrees180) |
PGDLLEXPORT Datum | degrees360V1 (PG_FUNCTION_ARGS) |
float8 | toPrecision (float8 n, float8 precision) |
float4 | minFloat4 (float4 a, float4 b) |
float4 | maxFloat4 (float4 a, float4 b) |
float8 | minFloat8 (float8 a, float8 b) |
float8 | maxFloat8 (float8 a, float8 b) |
int16 | minInt16 (int16 a, int16 b) |
int16 | maxInt16 (int16 a, int16 b) |
int32 | minInt32 (int32 a, int32 b) |
int32 | maxInt32 (int32 a, int32 b) |
int64 | minInt64 (int64 a, int64 b) |
int64 | maxInt64 (int64 a, int64 b) |
Timestamp | minTimestamp (Timestamp a, Timestamp b) |
Timestamp | maxTimestamp (Timestamp a, Timestamp b) |
Interval * | minInterval (const Interval *a, const Interval *b) |
Interval * | maxInterval (const Interval *a, const Interval *b) |
PGDLLEXPORT Datum | minFloat4V1 (PG_FUNCTION_ARGS) |
PGDLLEXPORT Datum | maxFloat4V1 (PG_FUNCTION_ARGS) |
PGDLLEXPORT Datum | minFloat8V1 (PG_FUNCTION_ARGS) |
PGDLLEXPORT Datum | maxFloat8V1 (PG_FUNCTION_ARGS) |
PGDLLEXPORT Datum | minInt16V1 (PG_FUNCTION_ARGS) |
PGDLLEXPORT Datum | maxInt16V1 (PG_FUNCTION_ARGS) |
PGDLLEXPORT Datum | minInt32V1 (PG_FUNCTION_ARGS) |
PGDLLEXPORT Datum | maxInt32V1 (PG_FUNCTION_ARGS) |
PGDLLEXPORT Datum | minInt64V1 (PG_FUNCTION_ARGS) |
PGDLLEXPORT Datum | maxInt64V1 (PG_FUNCTION_ARGS) |
PGDLLEXPORT Datum | minTimestampV1 (PG_FUNCTION_ARGS) |
PGDLLEXPORT Datum | maxTimestampV1 (PG_FUNCTION_ARGS) |
PGDLLEXPORT Datum | minIntervalV1 (PG_FUNCTION_ARGS) |
PGDLLEXPORT Datum | maxIntervalV1 (PG_FUNCTION_ARGS) |
PGDLLEXPORT Datum | getFalse (PG_FUNCTION_ARGS) |
#define ELIMINATE_MINUS_ZERO | ( | n | ) | ((n) == (0.0) ? (0.0) : (n)) |
#define getmsgTimeOffsetHermes | ( | msg | ) | (pq_getmsgfloat8((msg))) |
Referenced by recvRangeST(), and recvRangeT().
#define getmsgTimestampHermes | ( | msg | ) | (pq_getmsgfloat8((msg))) |
Referenced by recvBoxST(), recvPeriod(), recvPointST(), recvRangeST(), recvRangeT(), recvSegmentST(), and recvTrajectory().
#define HE_FS_INT64 "%lld" |
Referenced by decodeAISXML().
#define HE_FS_UINT64 "%llu" |
Referenced by decodeAISXML().
#define sendTimeOffsetHermes | ( | buf, | |
t | |||
) | (pq_sendfloat8((buf), (ELIMINATE_MINUS_ZERO((t))))) |
Referenced by RangeST2Bytea(), and RangeT2Bytea().
#define sendTimestampHermes | ( | buf, | |
t | |||
) | (pq_sendfloat8((buf), (ELIMINATE_MINUS_ZERO((t))))) |
Referenced by BoxST2Bytea(), Period2Bytea(), PointST2Bytea(), RangeST2Bytea(), RangeT2Bytea(), SegmentST2Bytea(), and Trajectory2Bytea().
int asprintfHermes | ( | char ** | ptr, |
const char * | frm, | ||
... | |||
) |
References buffer().
Referenced by decodeAISXML(), hermesDataTypesAsXML(), inBoxSP(), inBoxST(), inEllipsoid(), inLineSP(), inPeriod(), inPointENU(), inPointLL(), inPointPLH(), inPointSP(), inPointST(), inPointXY(), inPointXYZ(), inRangeSP(), inRangeST(), inRangeT(), inSegmentSP(), inSegmentST(), inTrajectory(), inVector2D(), inVector3D(), outBoxSP(), outBoxST(), outEllipsoid(), outLineSP(), outPeriod(), outPointENU(), outPointLL(), outPointPLH(), outPointSP(), outPointST(), outPointXY(), outPointXYZ(), outRangeSP(), outRangeST(), outRangeT(), outSegmentSP(), outSegmentST(), outTrajectory(), outVector2D(), and outVector3D().
float8 degrees2radians | ( | float8 | deg | ) |
Referenced by distanceSpherePointLL_PointLL(), ll2xy(), and xy2ll().
float8 degrees360 | ( | float8 | degrees180 | ) |
Referenced by degrees360V1().
PGDLLEXPORT Datum degrees360V1 | ( | PG_FUNCTION_ARGS | ) |
Interval* differenceInInterval | ( | Timestamp | tsA, |
Timestamp | tsB, | ||
Interval * | result | ||
) |
float8 differenceInSeconds | ( | Timestamp | tsA, |
Timestamp | tsB | ||
) |
References interval2seconds().
Referenced by accelerationAtTrajectory(), atInstantSPSegmentST(), atInstantTrajectory(), averageSpeedSegmentST(), compute_segment_dissim(), consistentGiSTSegmentST(), intersectionPointSegmentST_SegmentST(), normalizedSamplingRateTrajectory(), simplifyTrajectory(), speedAtTrajectory(), speedAtTTrajectory(), TrapezoidalSegmentST(), and updateMetadataTrajectory().
float8 dPi | ( | ) |
Referenced by areaRangeSP().
Timestamp epoch | ( | ) |
Referenced by seconds2timestamp().
PGDLLEXPORT Datum getFalse | ( | PG_FUNCTION_ARGS | ) |
float8 interval2seconds | ( | const Interval * | interval | ) |
Function converting the interval to seconds.
[in] | interval | constant pointer to interval |
Referenced by bufferBoxSTV1(), constructorHighRangeST(), constructorRangeST(), constructorRangeT(), differenceInSeconds(), distancePeriod_Period(), distancePeriod_Timestamp(), durationPeriod(), durationTrajectory(), enlargeBoxSTV1(), inRangeST(), inRangeT(), recvRangeST(), recvRangeT(), setS2T_SimplificationMethodT(), setS2T_TemporalBufferSize(), setTemporalTolerance(), and simplifyTrajectoryV1().
float4 maxFloat4 | ( | float4 | a, |
float4 | b | ||
) |
Referenced by maxFloat4V1().
PGDLLEXPORT Datum maxFloat4V1 | ( | PG_FUNCTION_ARGS | ) |
float8 maxFloat8 | ( | float8 | a, |
float8 | b | ||
) |
Referenced by maxFloat8V1().
PGDLLEXPORT Datum maxFloat8V1 | ( | PG_FUNCTION_ARGS | ) |
int16 maxInt16 | ( | int16 | a, |
int16 | b | ||
) |
Referenced by maxInt16V1().
PGDLLEXPORT Datum maxInt16V1 | ( | PG_FUNCTION_ARGS | ) |
int32 maxInt32 | ( | int32 | a, |
int32 | b | ||
) |
Referenced by maxInt32V1().
PGDLLEXPORT Datum maxInt32V1 | ( | PG_FUNCTION_ARGS | ) |
int64 maxInt64 | ( | int64 | a, |
int64 | b | ||
) |
Referenced by maxInt64V1().
PGDLLEXPORT Datum maxInt64V1 | ( | PG_FUNCTION_ARGS | ) |
Interval* maxInterval | ( | const Interval * | a, |
const Interval * | b | ||
) |
Referenced by maxIntervalV1().
PGDLLEXPORT Datum maxIntervalV1 | ( | PG_FUNCTION_ARGS | ) |
Timestamp maxTimestamp | ( | Timestamp | a, |
Timestamp | b | ||
) |
Referenced by maxTimestampV1().
PGDLLEXPORT Datum maxTimestampV1 | ( | PG_FUNCTION_ARGS | ) |
float4 minFloat4 | ( | float4 | a, |
float4 | b | ||
) |
Referenced by minFloat4V1().
PGDLLEXPORT Datum minFloat4V1 | ( | PG_FUNCTION_ARGS | ) |
float8 minFloat8 | ( | float8 | a, |
float8 | b | ||
) |
Referenced by distanceBoxSP_SegmentSP(), and minFloat8V1().
PGDLLEXPORT Datum minFloat8V1 | ( | PG_FUNCTION_ARGS | ) |
int16 minInt16 | ( | int16 | a, |
int16 | b | ||
) |
Referenced by minInt16V1().
PGDLLEXPORT Datum minInt16V1 | ( | PG_FUNCTION_ARGS | ) |
int32 minInt32 | ( | int32 | a, |
int32 | b | ||
) |
Referenced by minInt32V1().
PGDLLEXPORT Datum minInt32V1 | ( | PG_FUNCTION_ARGS | ) |
int64 minInt64 | ( | int64 | a, |
int64 | b | ||
) |
Referenced by minInt64V1().
PGDLLEXPORT Datum minInt64V1 | ( | PG_FUNCTION_ARGS | ) |
Interval* minInterval | ( | const Interval * | a, |
const Interval * | b | ||
) |
Referenced by minIntervalV1().
PGDLLEXPORT Datum minIntervalV1 | ( | PG_FUNCTION_ARGS | ) |
Timestamp minTimestamp | ( | Timestamp | a, |
Timestamp | b | ||
) |
Referenced by minTimestampV1().
PGDLLEXPORT Datum minTimestampV1 | ( | PG_FUNCTION_ARGS | ) |
float8 Pi | ( | ) |
float8 radians2degrees | ( | float8 | rad | ) |
Referenced by angleDistanceTraclus(), and xy2ll().
Timestamp roundTimestamp | ( | Timestamp | ts | ) |
References round(), and seconds2interval().
Referenced by atPointTSegmentST(), and roundTimestampV1().
PGDLLEXPORT Datum roundTimestampV1 | ( | PG_FUNCTION_ARGS | ) |
Interval* seconds2interval | ( | float8 | seconds, |
Interval * | result | ||
) |
Function converting the interval to seconds in its place.
[in] | seconds | Seconds |
[in] | result | pointer to result |
Referenced by getS2T_TemporalBufferSize(), getS2T_VotingSignal(), getTemporalTolerance(), roundTimestamp(), samplingPeriodTrajectoryV1(), seconds2timestamp(), timestampMinusSeconds(), and timestampPlusSeconds().
Timestamp seconds2timestamp | ( | float8 | seconds | ) |
Function converting seconds to timestamp.
seconds |
References epoch(), and seconds2interval().
Referenced by centroidTrajectory(), simplifyEpochTrajectory(), and Vector3D2PointST().
float8 timestamp2seconds | ( | Timestamp | ts | ) |
Function converting timestamp to seconds.
ts | timestamp |
Referenced by accelerationAtTTrajectory(), atInstantTrajectory(), atPeriodTrajectory(), centroidTrajectory(), compute_segment_dissim(), PointST2Vector3D(), simplifyEpochTrajectory(), and speedAtTTrajectory().
Timestamp timestampMinusSeconds | ( | Timestamp | ts, |
float8 | seconds | ||
) |
References seconds2interval().
Referenced by bufferBoxST(), and enlargeBoxST().
Timestamp timestampPlusSeconds | ( | Timestamp | ts, |
float8 | seconds | ||
) |
References seconds2interval().
Referenced by atBoxTrajectory(), atDistanceTrajectory(), atPointTrajectory(), atPointTSegmentST(), bufferBoxST(), enlargeBoxST(), simplifyTrajectory(), and speedAtTTrajectory().