TopologyDiagram.trails
- TopologyDiagram.trails(keys=False)[source]
Iterate over all the existing trails in the topology diagram.
- Parameters:
keys (
bool
, optional) – Defaults toFalse
.- Yields:
trail (
List[int]
orTuple[int, List[int]]
) – The next trail ifkeys
isFalse
. 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.