|
Algorithm 1 Naive Computation of Euclidean Distance Matrix |
-
1:
Input:
-
2:
▹ Initialize the distance matrix
-
3:
fortondo
-
4:
for ton do
-
5:
-
6:
for tod do
-
7:
▹ Compute difference between vectors
-
8:
▹ Accumulate squared differences
-
9:
end for
-
10:
▹ Store the squared distance
-
11:
end for
-
12:
end for
-
13:
Output:D
|