ETcVnDistanceType

Offers distance types.

Syntax

Definition:

TYPE ETcVnDistanceType :
(
    TCVN_DT_USER   := -1,
    TCVN_DT_L1     := 1,
    TCVN_DT_L2     := 2,
    TCVN_DT_C      := 3,
    TCVN_DT_L12    := 4,
    TCVN_DT_FAIR   := 5,
    TCVN_DT_WELSCH := 6,
    TCVN_DT_HUBER  := 7
)DINT;
END_TYPE

Values

Name

Description

TCVN_DT_USER

User defined distance

TCVN_DT_L1

|x1 - x2| + |y1 - y2|

TCVN_DT_L2

Euclidean distance

TCVN_DT_C

max(|x1 - x2|, |y1 - y2|)

TCVN_DT_L12

L1 - L2 : 2*(sqrt(1 + x*x/2) - 1))

TCVN_DT_FAIR

c^2(|x|/c-log(1+|x|/c)), c = 1.3998

TCVN_DT_WELSCH

c^2/2(1-exp(-(x/c)^2)), c = 2.9846

TCVN_DT_HUBER

|x|<c ? x^2/2 : c(|x|-c/2), c=1.345

Related functions