R/hyperDistancePathIndex.R

Defines functions hyperDistancePathIndex

Documented in hyperDistancePathIndex

hyperDistancePathIndex <- function(g, dist=NULL, wien=NULL){
   if(class(g)[1]!="graphNEL"){
    stop("'g' must be a 'graphNEL' object")
  }
   stopifnot(.validateGraph(g))
  
  if(is.null(dist)){
    dist <- distanceMatrix(g)
  }
  if(is.null(wien)){
    wien <- wiener(g)
  }
  wien + sum(nCm(dist,2))/2
}

Try the QuACN package in your browser

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

QuACN documentation built on May 2, 2019, 8:18 a.m.