Hermes
 All Data Structures Files Functions Variables Macros Pages
Distance.h File Reference

The implementantion of TRACLUS algorithm. More...

Include dependency graph for Distance.h:
This graph shows which files directly or indirectly include this file:

Functions

PointSPprojectionPointTraclus (const PointSP *point, const SegmentSP *segment, PointSP *result)
 The function returns the perpendicular projection of point onto a line and is need it by the TRACLUS algorithm. It`s definition is given by [lee2007trajectory.] More...
 
PGDLLEXPORT Datum projectionPointTraclusV1 (PG_FUNCTION_ARGS)
 
float8 perpendicularDistanceTraclus (const SegmentSP *segmentA, const SegmentSP *segmentB)
 The function returns the perpendicular distance between two segments and is need it by the TRACLUS algorithm. It`s definition is given by [lee2007trajectory.] More...
 
float8 parallelDistanceTraclus (const SegmentSP *segmentA, const SegmentSP *segmentB)
 The function returns the parallel distance between two segments and is need it by the TRACLUS algorithm. It`s definition is given by [lee2007trajectory.] More...
 
float8 angleDistanceTraclus (const SegmentSP *segmentA, const SegmentSP *segmentB)
 The function returns the anle distance between two segments and is need it by the TRACLUS algorithm. It`s definition is given by [lee2007trajectory.] More...
 
float8 traclusDistance (const SegmentSP *segmentA, const SegmentSP *segmentB, float4 w_perpendicular, float4 w_parallel, float4 w_angle)
 The function returns the TRACLUS clustering. It`s definition is given by [lee2007trajectory.] More...
 
PGDLLEXPORT Datum perpendicularDistanceTraclusV1 (PG_FUNCTION_ARGS)
 
PGDLLEXPORT Datum parallelDistanceTraclusV1 (PG_FUNCTION_ARGS)
 
PGDLLEXPORT Datum angleDistanceTraclusV1 (PG_FUNCTION_ARGS)
 
PGDLLEXPORT Datum traclusDistanceV1 (PG_FUNCTION_ARGS)
 

Detailed Description

The implementantion of TRACLUS algorithm.

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

TRACLUS (TRAjectory CLUStering) is an algorithm introduced by [lee2007trajectory] for the trejectoring clustering of similiar trajectories. For more detailed descritpion look at TRACLUS distance functions

See also
TRACLUS distance functions
http://hanj.cs.illinois.edu/pdf/sigmod07_jglee.pdf
Clustering/Traclus/Distance.sql

Function Documentation

float8 angleDistanceTraclus ( const SegmentSP segmentA,
const SegmentSP segmentB 
)

The function returns the anle distance between two segments and is need it by the TRACLUS algorithm. It`s definition is given by [lee2007trajectory.]

Returns
angle distance

References angleXXLineSP(), lengthSegmentSP(), radians2degrees(), and SegmentSP2LineSP().

Referenced by angleDistanceTraclusV1(), and traclusDistance().

Here is the call graph for this function:

PGDLLEXPORT Datum angleDistanceTraclusV1 ( PG_FUNCTION_ARGS  )

References angleDistanceTraclus().

Here is the call graph for this function:

float8 parallelDistanceTraclus ( const SegmentSP segmentA,
const SegmentSP segmentB 
)

The function returns the parallel distance between two segments and is need it by the TRACLUS algorithm. It`s definition is given by [lee2007trajectory.]

Returns
parallel distance

References distancePointSP_PointSP(), SegmentSP::e, SegmentSP::i, and projectionPointTraclus().

Referenced by parallelDistanceTraclusV1(), and traclusDistance().

Here is the call graph for this function:

PGDLLEXPORT Datum parallelDistanceTraclusV1 ( PG_FUNCTION_ARGS  )

References parallelDistanceTraclus().

Here is the call graph for this function:

float8 perpendicularDistanceTraclus ( const SegmentSP segmentA,
const SegmentSP segmentB 
)

The function returns the perpendicular distance between two segments and is need it by the TRACLUS algorithm. It`s definition is given by [lee2007trajectory.]

Returns
perpendicular distance

References distancePointSP_PointSP(), SegmentSP::e, SegmentSP::i, and projectionPointTraclus().

Referenced by perpendicularDistanceTraclusV1(), and traclusDistance().

Here is the call graph for this function:

PGDLLEXPORT Datum perpendicularDistanceTraclusV1 ( PG_FUNCTION_ARGS  )

References perpendicularDistanceTraclus().

Here is the call graph for this function:

PointSP* projectionPointTraclus ( const PointSP point,
const SegmentSP segment,
PointSP result 
)

The function returns the perpendicular projection of point onto a line and is need it by the TRACLUS algorithm. It`s definition is given by [lee2007trajectory.]

Returns
the point of perpendicular projection of point onto line

References SegmentSP::e, SegmentSP::i, round(), PointSP::x, and PointSP::y.

Referenced by parallelDistanceTraclus(), perpendicularDistanceTraclus(), and projectionPointTraclusV1().

Here is the call graph for this function:

PGDLLEXPORT Datum projectionPointTraclusV1 ( PG_FUNCTION_ARGS  )

References projectionPointTraclus().

Here is the call graph for this function:

float8 traclusDistance ( const SegmentSP segmentA,
const SegmentSP segmentB,
float4  w_perpendicular,
float4  w_parallel,
float4  w_angle 
)

The function returns the TRACLUS clustering. It`s definition is given by [lee2007trajectory.]

Returns
TRACLUS clustering

References angleDistanceTraclus(), parallelDistanceTraclus(), and perpendicularDistanceTraclus().

Referenced by traclusDistanceV1().

Here is the call graph for this function:

PGDLLEXPORT Datum traclusDistanceV1 ( PG_FUNCTION_ARGS  )

References traclusDistance().

Here is the call graph for this function: