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
Gdigraph

A NetworkX DiGraph

Returns
tri_by_typedict

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