Given a pattern of points on a linear network, this function computes the
matrix of distances between all pairs of points, measuring
distance by the shortest path in the network.
If method="C"
the distances are computed using
code in the C language. If method="interpreted"
then the
computation is performed using interpreted R code. The R code is
much slower, but is provided for checking purposes.
If two points cannot be joined by a path,
the distance between them is infinite (Inf
).