Computes a distance/similarity matrix given an array of data and a distance/similarity function.
(Array)
An array of data
(function)
A function that accepts two arguments and computes a distance/similarity between them
Array<Array>
:
The distance/similarity matrix. The matrix is square and has a size equal to the length of
the data array