This function computes and returns the distance matrix computed by using the specified distance measure to compute the distances between the rows of a data matrix.
distance(x, y, method = "euclidean")# S4 method for vclMatrix
dist(x, method = "euclidean", diag = FALSE, upper = FALSE, p = 2)
# S4 method for vclMatrix,vclMatrix
distance(x, y, method = "euclidean")
# S4 method for gpuMatrix
dist(x, method = "euclidean", diag = FALSE, upper = FALSE, p = 2)
# S4 method for gpuMatrix,gpuMatrix
distance(x, y, method = "euclidean")
a gpuMatrix
/vclMatrix
containing the pairwise distances
between rows of `x` and `y`, based on the specified method.
A gpuMatrix or vclMatrix object
A gpuMatrix or vclMatrix object
the distance measure to be used. This must be one of "euclidean" or "sqEuclidean".
logical value indicating whether the diagonal of the distance matrix should be printed
logical value indicating whether the upper triangle of the distance matrix
The power of the Minkowski distance (not currently used)