Hermes
|
The implementantion of TRACLUS algorithm. More...
#include "Definition.h"
Functions | |
float8 * | EuclideanStart (const Trajectory *trajectoryA, const Trajectory *trajectoryB, float8 *result) |
The function returns the euclidean distance between the first points of the trajectories. More... | |
PGDLLEXPORT Datum | EuclideanStartV1 (PG_FUNCTION_ARGS) |
float8 * | EuclideanEnd (const Trajectory *trajectoryA, const Trajectory *trajectoryB, float8 *result) |
The function returns the euclidean distance between the last points of the trajectories. More... | |
PGDLLEXPORT Datum | EuclideanEndV1 (PG_FUNCTION_ARGS) |
float8 * | EuclideanStartEnd (const Trajectory *trajectoryA, const Trajectory *trajectoryB, float8 *result) |
The function returns the average euclidean distance between the first and last points of the trajectories. More... | |
PGDLLEXPORT Datum | EuclideanStartEndV1 (PG_FUNCTION_ARGS) |
float8 * | Manhattan (const Trajectory *trajectoryA, const Trajectory *trajectoryB, int32 precision, float8 *result) |
The function returns the Manhattan norm between the trajectories. More... | |
PGDLLEXPORT Datum | ManhattanV1 (PG_FUNCTION_ARGS) |
float8 * | Euclidean (const Trajectory *trajectoryA, const Trajectory *trajectoryB, int32 precision, float8 *result) |
The function returns the euclidean norm between the trajectories. More... | |
PGDLLEXPORT Datum | EuclideanV1 (PG_FUNCTION_ARGS) |
float8 * | Chebyshev (const Trajectory *trajectoryA, const Trajectory *trajectoryB, int32 precision, float8 *result) |
The function returns the maximum norm between the trajectories. More... | |
PGDLLEXPORT Datum | ChebyshevV1 (PG_FUNCTION_ARGS) |
float8 * | DISSIM (const Trajectory *trajectoryA, const Trajectory *trajectoryB, int32 precision, float8 *result, float8 *error) |
The function returns DSSIM. More... | |
PGDLLEXPORT Datum | DISSIMExact (PG_FUNCTION_ARGS) |
PGDLLEXPORT Datum | DISSIMApproximate (PG_FUNCTION_ARGS) |
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) |
float8 * | LCSS (const Trajectory *trajectoryA, const Trajectory *trajectoryB, int32 w, float8 w_percentage, float8 eps, float8 *result) |
The function returns the Longest Common Subsequence. More... | |
PGDLLEXPORT Datum | LCSSV1 (PG_FUNCTION_ARGS) |
float8 * | EDR (const Trajectory *trajectoryA, const Trajectory *trajectoryB, float8 eps, float8 *result) |
The function returns the EDR. More... | |
PGDLLEXPORT Datum | EDRV1 (PG_FUNCTION_ARGS) |
float8 * | ERP (const Trajectory *trajectoryA, const Trajectory *trajectoryB, int32 lp, float8 *result) |
The function returns the ERP. More... | |
PGDLLEXPORT Datum | ERPV1 (PG_FUNCTION_ARGS) |
The implementantion of TRACLUS algorithm.
Similarity functions between trajectories. For more detailed descritpion look at Distance functions
float8* Chebyshev | ( | const Trajectory * | trajectoryA, |
const Trajectory * | trajectoryB, | ||
int32 | precision, | ||
float8 * | result | ||
) |
The function returns the maximum norm between the trajectories.
[in] | trajectoryA | The first trajectory |
[in] | trajectoryB | The second trajectory |
[in] | precision | The wanted precision |
[out] | result | The result |
References atInstantTrajectory(), distanceChebyshevPointSP_PointSP(), Trajectory::NrPoints, Trajectory::points, PointST::sp, and PointST::t.
Referenced by ChebyshevV1().
PGDLLEXPORT Datum ChebyshevV1 | ( | PG_FUNCTION_ARGS | ) |
References Chebyshev(), and validateInterpolationPrecision().
float8* DISSIM | ( | const Trajectory * | trajectoryA, |
const Trajectory * | trajectoryB, | ||
int32 | precision, | ||
float8 * | result, | ||
float8 * | error | ||
) |
The function returns DSSIM.
[in] | trajectoryA | The first trajectory |
[in] | trajectoryB | The second trajectory |
[in] | precision | The wanted precision |
[out] | result | The result |
[out] | error | The error |
References atInstantTrajectory(), compute_segment_dissim(), Trajectory::NrPoints, Trajectory::points, and PointST::t.
Referenced by DISSIMApproximate(), and DISSIMExact().
PGDLLEXPORT Datum DISSIMApproximate | ( | PG_FUNCTION_ARGS | ) |
References DISSIM(), and validateInterpolationPrecision().
PGDLLEXPORT Datum DISSIMExact | ( | PG_FUNCTION_ARGS | ) |
References DISSIM(), and validateInterpolationPrecision().
float8* DTW | ( | const Trajectory * | trajectoryA, |
const Trajectory * | trajectoryB, | ||
int32 | w, | ||
float8 | w_percentage, | ||
int32 | lp, | ||
float8 * | result | ||
) |
The function returns the Dynamic Time Warping.
[in] | trajectoryA | The first trajectory |
[in] | trajectoryB | The second trajectory |
[in] | w | the locality constraint |
[in] | w_percentage | if w < 0 then someone can use percentage of the the trajectory by defining this value |
[in] | lp | the norm to be used (currently only 1 and 2) |
[out] | result | The result |
References distanceManhattanPointSP_PointSP(), i(), j, min(), Trajectory::NrPoints, Trajectory::points, PointST::sp, and sqDistancePointSP_PointSP().
Referenced by DTWV1().
PGDLLEXPORT Datum DTWV1 | ( | PG_FUNCTION_ARGS | ) |
float8* EDR | ( | const Trajectory * | trajectoryA, |
const Trajectory * | trajectoryB, | ||
float8 | eps, | ||
float8 * | result | ||
) |
The function returns the EDR.
[in] | trajectoryA | The first trajectory |
[in] | trajectoryB | The second trajectory |
[in] | eps | the threshold, which determines whether or not two elements match. |
[out] | result | The result |
References GAP, HIT, i(), j, MISS, Trajectory::NrPoints, Trajectory::points, PointST::sp, PointSP::x, and PointSP::y.
Referenced by EDRV1().
PGDLLEXPORT Datum EDRV1 | ( | PG_FUNCTION_ARGS | ) |
float8* ERP | ( | const Trajectory * | trajectoryA, |
const Trajectory * | trajectoryB, | ||
int32 | lp, | ||
float8 * | result | ||
) |
The function returns the ERP.
[in] | trajectoryA | The first trajectory |
[in] | trajectoryB | The second trajectory |
[in] | lp | the norm to be used (currently only 1 and 2) |
[out] | result | The result |
References distanceManhattanPointSP_PointSP(), distancePointSP_PointSP(), i(), j, Trajectory::NrPoints, Trajectory::points, PointST::sp, PointSP::x, and PointSP::y.
Referenced by ERPV1().
PGDLLEXPORT Datum ERPV1 | ( | PG_FUNCTION_ARGS | ) |
float8* Euclidean | ( | const Trajectory * | trajectoryA, |
const Trajectory * | trajectoryB, | ||
int32 | precision, | ||
float8 * | result | ||
) |
The function returns the euclidean norm between the trajectories.
[in] | trajectoryA | The first trajectory |
[in] | trajectoryB | The second trajectory |
[in] | precision | The wanted precision |
[out] | result | The result |
References atInstantTrajectory(), Trajectory::NrPoints, Trajectory::points, PointST::sp, sqDistancePointSP_PointSP(), and PointST::t.
Referenced by EuclideanV1().
float8* EuclideanEnd | ( | const Trajectory * | trajectoryA, |
const Trajectory * | trajectoryB, | ||
float8 * | result | ||
) |
The function returns the euclidean distance between the last points of the trajectories.
[in] | trajectoryA | The first trajectory |
[in] | trajectoryB | The second trajectory |
[out] | result | The result |
References distancePointSP_PointSP(), Trajectory::NrPoints, Trajectory::points, and PointST::sp.
Referenced by EuclideanEndV1().
PGDLLEXPORT Datum EuclideanEndV1 | ( | PG_FUNCTION_ARGS | ) |
float8* EuclideanStart | ( | const Trajectory * | trajectoryA, |
const Trajectory * | trajectoryB, | ||
float8 * | result | ||
) |
The function returns the euclidean distance between the first points of the trajectories.
[in] | trajectoryA | The first trajectory |
[in] | trajectoryB | The second trajectory |
[out] | result | The result |
References distancePointSP_PointSP(), Trajectory::NrPoints, Trajectory::points, and PointST::sp.
Referenced by EuclideanStartV1().
float8* EuclideanStartEnd | ( | const Trajectory * | trajectoryA, |
const Trajectory * | trajectoryB, | ||
float8 * | result | ||
) |
The function returns the average euclidean distance between the first and last points of the trajectories.
[in] | trajectoryA | The first trajectory |
[in] | trajectoryB | The second trajectory |
[out] | result | The result |
References distancePointSP_PointSP(), Trajectory::NrPoints, Trajectory::points, and PointST::sp.
Referenced by EuclideanStartEndV1().
PGDLLEXPORT Datum EuclideanStartEndV1 | ( | PG_FUNCTION_ARGS | ) |
PGDLLEXPORT Datum EuclideanStartV1 | ( | PG_FUNCTION_ARGS | ) |
PGDLLEXPORT Datum EuclideanV1 | ( | PG_FUNCTION_ARGS | ) |
References Euclidean(), and validateInterpolationPrecision().
float8* LCSS | ( | const Trajectory * | trajectoryA, |
const Trajectory * | trajectoryB, | ||
int32 | w, | ||
float8 | w_percentage, | ||
float8 | eps, | ||
float8 * | result | ||
) |
The function returns the Longest Common Subsequence.
[in] | trajectoryA | The first trajectory |
[in] | trajectoryB | The second trajectory |
[in] | w | the locality constraint |
[in] | w_percentage | if w < 0 then someone can use percentage of the the trajectory by defining this value |
[in] | eps | the threshold, which determines whether or not two elements match. if eps<=0 or eps>=1 then eps = min(stedev(trajectories)) |
[out] | result | The result |
References i(), j, match(), Trajectory::NrPoints, Trajectory::points, PointST::sp, and stddevTrajectory().
Referenced by LCSSV1().
PGDLLEXPORT Datum LCSSV1 | ( | PG_FUNCTION_ARGS | ) |
float8* Manhattan | ( | const Trajectory * | trajectoryA, |
const Trajectory * | trajectoryB, | ||
int32 | precision, | ||
float8 * | result | ||
) |
The function returns the Manhattan norm between the trajectories.
[in] | trajectoryA | The first trajectory |
[in] | trajectoryB | The second trajectory |
[in] | precision | The wanted precision |
[out] | result | The result |
References atInstantTrajectory(), distanceManhattanPointSP_PointSP(), Trajectory::NrPoints, Trajectory::points, PointST::sp, and PointST::t.
Referenced by ManhattanV1().
PGDLLEXPORT Datum ManhattanV1 | ( | PG_FUNCTION_ARGS | ) |
References Manhattan(), and validateInterpolationPrecision().