TopologyDiagram.trails

TopologyDiagram.trails(keys=False)[source]

Iterate over all the existing trails in the topology diagram.

Parameters:

keys (bool, optional) – Defaults to False.

Yields:

trail (List[int] or Tuple[int, List[int]]) – The next trail if keys is False. Otherwise, a tuple with the trail key and the keys of the nodes on the trail.

Notes

A trail is an ordered sequence of node keys. This iterator yields auxiliary trails too, if any.