Modified Zagreb index

Share:

Description

This method calculates the modified Zagreb index.

Usage

1
modifiedZagreb(g, deg = NULL)

Arguments

g

a graph as a graphNEL object.

deg

the degree of each node of g. Will be automatically calculated if not supplied.

Value

This method returns the modified Zagreb index of a graph as a double-precision floating point value.

Author(s)

Lavanya Sivakumar, Michael Schutte

References

S. Nikolic and G. Kovacevic and A. Milicevic and N. Trinajstic: The Zagreb Indices 30 Years After. Croatica Chemica Acta, 76:113-124, 2003

Examples

1
2
3
4
5
6
7
8
library(graph)
set.seed(123)
g <- randomEGraph(as.character(1:9), 0.5)

# optional: pre-calculate degree of nodes in g
vec.degree <- graph::degree(g)

modifiedZagreb(g, vec.degree)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.