ETcVnDistanceType

Offers distance types.

Syntax

Definition:

enum ETcVnDistanceType : LONG
{
    DT_USER   = -1,
    DT_L1     = 1,
    DT_L2     = 2,
    DT_C      = 3,
    DT_L12    = 4,
    DT_FAIR   = 5,
    DT_WELSCH = 6,
    DT_HUBER  = 7
};

Values

Name

Description

DT_USER

User defined distance

DT_L1

|x1 - x2| + |y1 - y2|

DT_L2

Euclidean distance

DT_C

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

DT_L12

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

DT_FAIR

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

DT_WELSCH

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

DT_HUBER

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