#

Note

This documents the development version of NetworkX. Documentation for the current release can be found here.

#

networkx.algorithms.triads.triads_by_type

triads_by_type(G)[source]

Returns a list of all triads for each triad type in a directed graph.

Parameters

G (digraph) – A NetworkX DiGraph

Returns

tri_by_type – Dictionary with triad types as keys and lists of triads as values.

Return type

dict