Learn R Programming

QuACN (version 1.8.0)

augmentedZagreb: Augmented Zagreb index

Description

This method calculates the augmented Zagreb index.

Usage

augmentedZagreb(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

as a double-precision floating point value.

References

B. Furtula and A. Graovac and D. Vukicevic: Augmented Zagreb Index. Journal of Mathematical Chemistry, 48:370-380, 2010.

Examples

Run this code

library(graph)
set.seed(123)
g <- randomEGraph(as.character(1:8), 0.6)

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

augmentedZagreb(g, vec.degree)

Run the code above in your browser using DataLab