symbolic_dynamics.sofic.reduce¶
-
symbolic_dynamics.sofic.
reduce
(G)[source]¶ Compute the reduction of G.
The reduction of G is the graph resulting from merging follower-equivalant states in G.
- Parameters
- Gdeterministic labeled graph
- Returns
- deterministic labeled graph
the reduction of G
Examples
>>> G = nx.MultiDiGraph() >>> G.add_edge(1, 3, label="a") >>> G.add_edge(2, 3, label="a") >>> G.add_edge(1, 1, label="b") >>> G.add_edge(2, 2, label="b") >>> G.add_edge(3, 3, label="b") >>> list(sd.reduce(G).edges(data="label")) [({1, 2}, {3}, 'a'), ({1, 2}, {1, 2}, 'b'), ({3}, {3}, 'b')]