compute_distance_matrix {gor} | R Documentation |
-distance matrix computation
Description
It computes the distance matrix of a set of
two-dimensional points given by a
matrix using
the distance-
with
by default.
Usage
compute_distance_matrix(z, p = 2)
Arguments
z |
A |
p |
The |
Details
Given a set of points
, the
distance matrix is a
symmetric matrix with
matrix elements
computed using the
distance- given by
.
Value
The distance- of the points.
Author(s)
Cesar Asensio
See Also
compute_p_distance computes the distance-,
compute_tour_distance computes tour distances. A distance
matrix can also be computed using dist.
Examples
set.seed(1)
n <- 25
z <- cbind(runif(n,min=1,max=10),runif(n,min=1,max=10))
d <- compute_distance_matrix(z)
[Package gor version 1.0 Index]