R/adj.get.hops.R

## function to compute the shortest path
'adj.get.hops' <- 
function(adjmat) {
	#require(RBGL)
	hops <- RBGL::floyd.warshall.all.pairs.sp(as(adjmat,"graphNEL"))
	#dimnames(hops) <- dimnames(adjmat)
	hops[abs(hops) == Inf] <- NA
	return(hops)
}
bhklab/predictionet documentation built on May 12, 2019, 8:28 p.m.