Defines functions atomBondConnectivity

Documented in atomBondConnectivity

atomBondConnectivity <- function(g, deg=NULL){

  if (class(g)[1] != "graphNEL")
    stop("'g' must be a 'graphNEL' object")
  if (is.null(deg))
    deg <- graph::degree(g)

  sum(.edgeApply(g, function(from, to) {
    sqrt((deg[from] + deg[to] - 2) / (deg[from] * deg[to]))
  }, dupls=FALSE))

Try the QuACN package in your browser

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

QuACN documentation built on May 31, 2017, 3:51 a.m.