K i dZddlZddlmZdgZidgddgddd gd d d gd dd gddd gdgddgddgddgddgddgddgddgddgd d!gd"Zejdd#$d%Zy)&zZFunctions that generate the triad graphs, that is, the possible digraphs on three nodes. N)DiGraph triad_graph003012ab102ba021Dbc021Ucb021C111D)accar 111U)rrr 030T)rr r030C)r r r201)rr rr120D)r r rr120U)rr rr120C)rr rr210)rr r rr300)rr r r rrT)graphs returns_graphc|tvrtd|dt}|jd|j t||S)aReturns the triad graph with the given name. Each string in the following tuple is a valid triad name:: ( "003", "012", "102", "021D", "021U", "021C", "111D", "111U", "030T", "030C", "201", "120D", "120U", "120C", "210", "300", ) Each triad name corresponds to one of the possible valid digraph on three nodes. Parameters ---------- triad_name : string The name of a triad, as described above. Returns ------- :class:`~networkx.DiGraph` The digraph on three nodes with the given name. The nodes of the graph are the single-character strings 'a', 'b', and 'c'. Raises ------ ValueError If `triad_name` is not the name of a triad. See also -------- triadic_census zunknown triad name "z9"; use one of the triad names in the TRIAD_NAMES constantabc) TRIAD_EDGES ValueErrorradd_nodes_fromadd_edges_from) triad_nameGs `/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/networkx/generators/triads.pyrr%sZb$":,/+ +    AU[,- H) __doc__networkxnxnetworkx.classesr__all__r _dispatchablerr&r%r.s  $ / 2 D6 D$< T4L   T4L   T4L      # $ $ $ )  /! (T28 38 r&