Warning
This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.
triadic_census¶

triadic_census
(G)[source]¶ Determines the triadic census of a directed graph.
The triadic census is a count of how many of the 16 possible types of triads are present in a directed graph.
Parameters: G (digraph) – A NetworkX DiGraph Returns: census – Dictionary with triad names as keys and number of occurrences as values. Return type: dict Notes
This algorithm has complexity where is the number of edges in the graph.
References
[1] Vladimir Batagelj and Andrej Mrvar, A subquadratic triad census algorithm for large sparse networks with small maximum degree, University of Ljubljana, http://vlado.fmf.unilj.si/pub/networks/doc/triads/triads.pdf