Learn R Programming

QuACN (version 1.8.0)

complexityIndexB: The complexity index B

Description

This method calcualtes the complexity index B of a given graph

Usage

complexityIndexB(g, dist = NULL, deg = NULL)

Arguments

g
a graph as a graphNEL object.
dist
the distance matrix of the graph. If the parameter is empty the distance matrix will be calculated within the function.
deg
the degree of each node

Value

References

D. Bonchev and D. H. Rouvray, Complexity in Chemistry, Biology, and Ecology, ser. Mathematical and Computational Chemistry. Springer, 2005, New York, NY, USA.

Examples

Run this code
library(RBGL)
set.seed(123)
g <- randomGraph(1:8, 1:5, 0.36, weights=FALSE)

complexityIndexB(g)

Run the code above in your browser using DataLab