MobilityDB 1.1
Functions
tnumber_mathfuncs.c File Reference
#include "general/tnumber_mathfuncs.h"
#include <assert.h>
#include <math.h>
#include <postgres.h>
#include <utils/float.h>
#include <meos.h>
#include <meos_internal.h>
#include "general/lifting.h"
#include "general/pg_types.h"
#include "general/temporaltypes.h"
#include "general/type_util.h"
Include dependency graph for tnumber_mathfuncs.c:

Functions

Temporalarithop_tnumber_number (const Temporal *temp, Datum value, meosType basetype, TArithmetic oper, Datum(*func)(Datum, Datum, meosType, meosType), bool invert)
 Generic arithmetic operator on a temporal number and a number. More...
 
Temporalarithop_tnumber_tnumber (const Temporal *temp1, const Temporal *temp2, TArithmetic oper, Datum(*func)(Datum, Datum, meosType, meosType), bool(*tpfunc)(const TInstant *, const TInstant *, const TInstant *, const TInstant *, Datum *, TimestampTz *))
 Generic arithmetic operator on two temporal numbers. More...
 
static Datum datum_degrees (Datum value)
 Mathematical operators (+, -, *, /) and functions (round, degrees,...) for temporal numbers. More...
 
static Datum datum_radians (Datum value)
 Convert a number from degrees to radians. More...
 
Temporaltfloat_degrees (const Temporal *temp)
 Convert a temporal number from radians to degrees. More...
 
Temporaltfloat_derivative (const Temporal *temp)
 Return the derivative of a temporal number. More...
 
Temporaltfloat_radians (const Temporal *temp)
 Convert a temporal number from degrees to radians. More...
 
TSequencetfloatseq_derivative (const TSequence *seq)
 Return the derivative of a temporal sequence number. More...
 
TSequenceSettfloatseqset_derivative (const TSequenceSet *ss)
 Return the derivative of a temporal sequence set number. More...
 
Temporaltnumber_abs (const Temporal *temp)
 Get the absolute value of a temporal number. More...
 
static bool tnumber_arithop_tp_at_timestamp (const TInstant *start1, const TInstant *end1, const TInstant *start2, const TInstant *end2, char op, Datum *value, TimestampTz *t)
 Find the single timestamptz at which the operation of two temporal number segments is at a local minimum/maximum. More...
 
static bool tnumber_arithop_tp_at_timestamp1 (const TInstant *start1, const TInstant *end1, const TInstant *start2, const TInstant *end2, TimestampTz *t)
 Find the single timestamptz at which the operation of two temporal number segments is at a local minimum/maximum. More...
 
bool tnumber_div_tp_at_timestamp (const TInstant *start1, const TInstant *end1, const TInstant *start2, const TInstant *end2, Datum *value, TimestampTz *t)
 Find the single timestamptz at which the division of two temporal number segments is at a local minimum/maximum. More...
 
bool tnumber_mult_tp_at_timestamp (const TInstant *start1, const TInstant *end1, const TInstant *start2, const TInstant *end2, Datum *value, TimestampTz *t)
 Find the single timestamptz at which the multiplication of two temporal number segments is at a local minimum/maximum. More...
 
TInstanttnumberinst_abs (const TInstant *inst)
 
TSequencetnumberseq_iter_abs (const TSequence *seq)
 
TSequencetnumberseq_linear_abs (const TSequence *seq)
 
TSequenceSettnumberseqset_abs (const TSequenceSet *ss)