Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

transitivity

Calculate transitivity for an undirected graph


Description

Calculate transitivity for an undirected graph

Usage

transitivity(g)

Arguments

g

an instance of the graph class

Details

For an undirected graph G, let delta(v) be the number of triangles with v as a node, let tau(v) be the number of triples, i.e., paths of length 2 with v as the center node.

Define transitivity T(G) = sum(delta(v)) / sum(tau(v)), for all v in V.

Value

Transitivity for graph g.

Author(s)

References

Approximating Clustering Coefficient and Transitivity, T. Schank, D. Wagner, Journal of Graph Algorithms and Applications, Vol. 9, No. 2 (2005).

See Also

clusteringCoef, clusteringCoefAppr, graphGenerator

Examples

con <- file(system.file("XML/conn.gxl",package="RBGL"))
g <- fromGXL(con)
close(con)

tc <- transitivity(g)

RBGL

An interface to the BOOST graph library

v1.66.0
Artistic-2.0
Authors
Vince Carey <stvjc@channing.harvard.edu>, Li Long <li.long@isb-sib.ch>, R. Gentleman
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.