class documentation
class EulerTour:
Abstract base class for performing Euler tour of a tree.
_hook_previsit and _hook_postvisit may be overridden by subclasses.
Method | __init__ |
Prepare an Euler tour template for given tree. |
Method | execute |
Perform the tour and return any result from post visit of root. |
Method | tree |
Return reference to the tree being traversed. |
Method | _hook |
Visit Position p, after the tour of its children. |
Method | _hook |
Visit Position p, before the tour of its children. |
Method | _tour |
Perform tour of subtree rooted at Position p. |
Instance Variable | _tree |
Undocumented |
Visit Position p, after the tour of its children.
p Position of current position being visited d depth of p in the tree path list of indices of children on path from root to p results is a list of values returned by _hook_postvisit(c) for each child c of p.
Visit Position p, before the tour of its children.
p Position of current position being visited d depth of p in the tree path list of indices of children on path from root to p