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

The implementantion of TRACLUS algorithm. More...

Include dependency graph for Distance.c:

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)
 
 PG_FUNCTION_INFO_V1 (projectionPointTraclusV1)
 
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)
 
 PG_FUNCTION_INFO_V1 (perpendicularDistanceTraclusV1)
 
PGDLLEXPORT Datum parallelDistanceTraclusV1 (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (parallelDistanceTraclusV1)
 
PGDLLEXPORT Datum angleDistanceTraclusV1 (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (angleDistanceTraclusV1)
 
PGDLLEXPORT Datum traclusDistanceV1 (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (traclusDistanceV1)
 

Detailed Description

The implementantion of TRACLUS algorithm.

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

This function is documented in the Traclus/Distance.h

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:

PG_FUNCTION_INFO_V1 ( projectionPointTraclusV1  )
PG_FUNCTION_INFO_V1 ( perpendicularDistanceTraclusV1  )
PG_FUNCTION_INFO_V1 ( parallelDistanceTraclusV1  )
PG_FUNCTION_INFO_V1 ( angleDistanceTraclusV1  )
PG_FUNCTION_INFO_V1 ( traclusDistanceV1  )
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: