Function output of the shortest_path function where the input graph is graph, backwards index is index, and tree is tree
tree
Format:
output of the shortest_path function where the input graph is graph, backwards index is index, and tree is tree
Input:
list graph -
number index -
list tree -
Output:
list - None
Properties that reference this function:
shortest path from node v to every other node in graph graph = output of the shortest_path function where the input graph is graph, backwards index is 0, and tree is [ node (v, 0, None), [ ] ] (compute shortest path begin)
Conditional properties that reference this function:
if the following are true:
- children of the node at backwards index i of tree tree in graph graph = children
- result of adding or updating children children of the node at backwards index i in tree tree = new_tree
then output of the shortest_path function where the input graph is graph, backwards index is i, and tree is tree = output of the shortest_path function where the input graph is graph, backwards index is (i + 1), and tree is new_tree
(link)if i = length of stack tree, then output of the shortest_path function where the input graph is graph, backwards index is i, and tree is tree = tree
(link)
Comments
Please log in to add comments