Hermes
 All Data Structures Files Functions Variables Macros Pages
DTW.c File Reference

The implementation of Trajectory. More...

#include "../../../h/SpatioTemporal/Trajectory/Similarity.h"
#include "../../../h/Spatial/PointSP/Distance.h"
#include <math.h>
#include <float.h>
Include dependency graph for DTW.c:

Functions

float8 * DTW (const Trajectory *trajectoryA, const Trajectory *trajectoryB, int32 w, float8 w_percentage, int32 lp, float8 *result)
 The function returns the Dynamic Time Warping. More...
 
PGDLLEXPORT Datum DTWV1 (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (DTWV1)
 

Detailed Description

The implementation of Trajectory.

Author
Marios Vodas (mvoda.nosp@m.s@gm.nosp@m.ail.c.nosp@m.om).

These functions are documented in the Trajectory/Similarity.h

Function Documentation

float8* DTW ( const Trajectory trajectoryA,
const Trajectory trajectoryB,
int32  w,
float8  w_percentage,
int32  lp,
float8 *  result 
)

The function returns the Dynamic Time Warping.

Parameters
[in]trajectoryAThe first trajectory
[in]trajectoryBThe second trajectory
[in]wthe locality constraint
[in]w_percentageif w < 0 then someone can use percentage of the the trajectory by defining this value
[in]lpthe norm to be used (currently only 1 and 2)
[out]resultThe result

References distanceManhattanPointSP_PointSP(), i(), j, min(), Trajectory::NrPoints, Trajectory::points, PointST::sp, and sqDistancePointSP_PointSP().

Referenced by DTWV1().

Here is the call graph for this function:

PGDLLEXPORT Datum DTWV1 ( PG_FUNCTION_ARGS  )

References DTW().

Here is the call graph for this function:

PG_FUNCTION_INFO_V1 ( DTWV1  )