Learn R Programming

QuACN (version 1.8.0)

bonchev2: Magnitude-based information index by Bonchev I_D^W(G)

Description

This method calculates the magnitude-based information index by Bonchev I_D^W(G)

Usage

bonchev2(g, dist = NULL, wien = 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.
wien
the Wiener index of g.

Value

References

D. Bonchev and N. Trinajstic, Information theory, distance matrix and molecular branching, J. Chem. Phys., 67:4517-4533, 1977

Examples

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


#calculate Distance Matrix
mat.dist <- distanceMatrix(g)

bonchev2(g)
bonchev2(g,mat.dist, wiener(g))

Run the code above in your browser using DataLab