\HeaderA{transitivity}{Calculate transitivity for an undirected graph}{transitivity}
\keyword{models}{transitivity}
\begin{Description}\relax
Calculate transitivity for an undirected graph
\end{Description}
\begin{Usage}
\begin{verbatim}
transitivity(g)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{g}] an instance of the \code{graph} class 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
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.
\end{Details}
\begin{Value}
Transitivity for graph \code{g}.
\end{Value}
\begin{Author}\relax
Li Long <li.long@isb-sib.ch>
\end{Author}
\begin{References}\relax
Approximating Clustering Coefficient and Transitivity, T. Schank, D. Wagner,
Journal of Graph Algorithms and Applications, Vol. 9, No. 2 (2005).
\end{References}
\begin{SeeAlso}\relax
clusteringCoef, clusteringCoefAppr, graphGenerator
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
g <- fromGXL(file(system.file("XML/conn.gxl",package="RBGL")))
tc <- transitivity(g)
\end{ExampleCode}
\end{Examples}

