7.9.2. networkx.algorithms.coloring.strategy_connected_sequential¶
-
networkx.algorithms.coloring.strategy_connected_sequential(G, colors, traversal='bfs')[source]¶ Returns an iterable over nodes in
Gin the order given by a breadth-first or depth-first traversal.traversalmust be one of the strings'dfs'or'bfs', representing depth-first traversal or breadth-first traversal, respectively.The generated sequence has the property that for each node except the first, at least one neighbor appeared earlier in the sequence.
Gis a NetworkX graph.colorsis ignored.