networkx.algorithms.triads.all_triplets

all_triplets(G)[source]

Returns a generator of all possible sets of 3 nodes in a DiGraph.

Parameters

G (digraph) – A NetworkX DiGraph

Returns

triplets – Generator of tuples of 3 nodes

Return type

generator of 3-tuples