Learn R Programming

QuACN (version 1.8.0)

harary: Harary Index

Description

This method calculates the Harary Index.

Usage

harary(g, dist = 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.

Value

Details

This method calculates the Hararay index:

References

A. T. Balaban and O. Ivanciuc, Historical Development of Topological Indices, in Topological Indices and Related Descriptors in QSAR and QSPAR, J. Devillers and A. T. Balaban, Eds. Gordon and Breach Science Publishers, 1999, pp. 21-57, Amsterdam, The Netherlands.

Examples

Run this code

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

harary(g)

Run the code above in your browser using DataLab