R/bondOrderID.R

Defines functions bondOrderID

Documented in bondOrderID

bondOrderID <- function(g) {
  if (class(g)[1] != "graphNEL")
    stop("'g' has to be a 'graphNEL' object")
  stopifnot(.validateGraph(g))

  e <- edges(g)
  ed <- .edgeDataMatrix(g, "bond")
  .weightedPathSum(e, NULL, function(i, from, to) as.numeric(ed[[from, to]]))
}

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, 5:46 p.m.