powered by
mstUB Compute the shortest path upper bound for all unknown entries in a partial distance matrix
mstUB
mstUB(A)
A (connected) partial distance matrix, with unknown entries set to Inf
UB A matrix containing the upper bounds for only the unknown entries. All other entries will be set to Inf.
This function uses the shortest.paths() function, available in the igraph package.
# NOT RUN { A <- dist(cbind(rnorm(10,0,1),rnorm(10,0,1))) mstUB(as.matrix(A)) # }
Run the code above in your browser using DataLab