symbolic_dynamics.sofic.is_stranded¶
-
symbolic_dynamics.sofic.
is_stranded
(G, q)[source]¶ Returns True iff q is stranded in G.
A vertex q in G is stranded if there is no edge starting at q or if there is no edge ending at q.
- Parameters
- Ggraph
- qvertex in G
See also
Examples
>>> G = nx.MultiDiGraph() >>> G.add_edge(1, 2) >>> sd.is_stranded(G, 1) True >>> G.add_edge(1, 1) >>> sd.is_stranded(G, 1) False