|
Cityblock distance of two coordinate arrays
-
a1
:
^a array
-
-
a2
:
^a array
-
-
Returns:
float
-
|
|
Cityblock distance of two coordinate float arrays (ignores nan)
-
a1
:
float array
-
-
a2
:
float array
-
-
Returns:
float
-
|
|
Euclidean distance of two coordinate arrays
-
a1
:
^a array
-
-
a2
:
^a array
-
-
Returns:
float
-
|
|
Euclidean distance of two coordinate float arrays (ignores nan)
-
a1
:
float array
-
-
a2
:
float array
-
-
Returns:
float
-
|
|
Squared Euclidean distance of two coordinate float arrays (ignores nan)
-
a1
:
float array
-
-
a2
:
float array
-
-
Returns:
float
-
|
|
Calculates Hamming distance of two coordinate arrays
-
a1
:
'a array
-
first array
-
a2
:
'a array
-
second array
-
Returns:
int
-
Hamming distance between elements of given arrays
// e.g. a1 and a2 initialization
let a1 = [|1; 2; 3|]
let a2 = [|9; 2; 3|]
// Apply the hamming to a1 and a2
Array.hamming a1 a2
|
|
The [Minkowski distance](https://en.wikipedia.org/wiki/Minkowski_distance) between two arrays of order `p`.
-
a1
:
^a array
-
a2
:
^a array
-
p
:
float
-
float constrained to `p > 0`
-
Returns:
float option
-
Minkowski distance between elements of given arrays. Returns NaN if arrays contain NaN.
// e.g. a1 and a2 initialization
let a1 = [|3.14; 2.0; 3.1|]
let a2 = [|9.1; 2.5; 3.7|]
// Apply the minkowski distance to a1 and a2
Array.minkowski a1 a2 3
|
|
The [Minkowski distance](https://en.wikipedia.org/wiki/Minkowski_distance) between two arrays (ignores NaN) of order `p`.
-
a1
:
float array
-
a2
:
float array
-
p
:
float
-
float constrained to `p > 0`
-
Returns:
float option
-
Minkowski distance between elements of given arrays.
// e.g. a1 and a2 initialization
let a1 = [|3.14; 2.0; 3.1|]
let a2 = [|9.1; 2.5; 3.7|]
// Apply the minkowski distance to a1 and a2
Array.minkowskiNaN a1 a2 3
|