Package pygraph :: Package algorithms :: Module traversal

# Module traversal

Traversal algorithms.

Functions

iterator

traversal(graph, node, order) Graph traversal iterator. |

Variables
| __package__ = `None`

Function Details

### traversal(graph, node, order)

Graph traversal iterator.

Parameters:
  - `graph` (graph, digraph) - Graph.
  - `node` (node) - Node.
  - `order` (string) - traversal ordering. Possible values are:
    2. 'pre' - Preordering (default)
    1. 'post' - Postordering
Returns: iterator
  Traversal iterator.