Function result of adding or updating children pairs of the node at backwards index index in tree tree

tree

Format:

result of adding or updating children pairs of the node at backwards index index in tree tree

Input:

list tree -
number index -
list pairs -

Output:

list - None

Conditional properties that reference this function:

  • if the following are true:
    • ((length of stack tree) - 1) - index = back_i
    • the element at index back_i of stack tree = node (value, distance, previous)
    • result of splitting pairs into nodes that exist in the tree tree and new nodes = pair (exists, new)
    • result of updating nodes exists in tree tree with parent index index and parent distance distance = updated

    then result of adding or updating children pairs of the node at backwards index index in tree tree = result of pushing nodes new into tree updated where parent is index and parent distance is distance

    (link)
  • 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)


Comments

Please log in to add comments