Lines Matching refs:DFS
61 root to the node containing the word. This is what our DFS function in
67 1: def DFS (root, word, cur_path):
85 19: return DFS (left_child_ptr, word, cur_path)
91 25: return DFS (right_child_ptr, word, cur_path)
100 the DFS function. The first parameter is going to be a node in our
132 the header file SBValue.h. The SBValue methods that we use in our DFS function
136 Explaining DFS Script in Detail
152 Lines 2-11 of DFS are getting data out of the current tree node and getting
154 Lines 2-4 of our DFS function get the word, left and right fields out of the
171 One other note: Typing something as long as our DFS function directly into the
178 The DFS Script in Action
181 At this point we are ready to use the DFS function to see if the word "Romeo"
213 >>> path = tree_utils.DFS (root, "Romeo", current_path)
230 imports the file where we wrote our DFS function, tree_utils.py, into Python.
251 an empty string. As we go right and left through the tree, the DFS function
256 path = tree_utils.DFS (root, "Romeo", current_path)
258 calls our DFS function (prefixing it with the module name so that Python can
260 are searching for, and our current path. We assign whatever path the DFS
286 commands will use the global path Python variable that we got from our DFS
482 So the word we are searching for is "romeo" and the word at our DFS location is
493 DFS function and other Python script examples (tree_utils.py) used for this
496 tree_utils.py - Example Python functions using LLDB's API, including DFS
516 For a thorough explanation of how the DFS function works, and
522 def DFS(root, word, cur_path):
565 return DFS(left_child_ptr, word, cur_path)
574 return DFS(right_child_ptr, word, cur_path)