helper.preorder_st_traversal¶
-
helper.preorder_st_traversal(H, T)[source]¶ Conducts a pre-ordered traversal of tree T with an s-t orientation.
s is the source node and t is the target node for the PDP. Traversal of an s-t oriented tree involves traversing the tree in pre-order, but leaving the branch with t to be visited last at each step possible.
Parameters: - H (graph) – The request graph.
- T (graph) – A spanning tree of H.
Returns: P – PDP tour solution.
Return type: graph