is_triad#
- is_triad(G)[source]#
Returns True if the graph G is a triad, else False.
- Parameters:
- Ggraph
A NetworkX Graph
- Returns:
- istriadboolean
Whether G is a valid triad
Examples
>>> G = nx.DiGraph([(1, 2), (2, 3), (3, 1)]) >>> nx.is_triad(G) True >>> G.add_edge(0, 1) >>> nx.is_triad(G) False ----
Additional backends implement this function
graphblas : OpenMP-enabled sparse linear algebra backend.