R/graphDist.r

Defines functions graphDist

Documented in graphDist

graphDist <- function(A)
{
	  g             <- graph.adjacency(Matrix(A, sparse=T), mode="undirected")
	  g             <- igraph.to.graphNEL(g)
	  DIST          <- as.dist(johnson.all.pairs.sp(g))
	  DIST          <- 1/DIST
	  return(DIST)
}

Try the ldstatsHD package in your browser

Any scripts or data that you put into this service are public.

ldstatsHD documentation built on Aug. 14, 2017, 5:06 p.m.