def breadth_first_search(self, root=None, filter=filters.null()): """ Breadth-first search. @deprecated: This method will be removed in further versions. Use L{pygraph.algorithms.searching.breadth_first_search} instead. @type root: node @param root: Optional root node (will explore only root's connected component) @rtype: dictionary @return: A tuple containing a dictionary and a list. 1. Generated spanning tree 2. Graph's level-based ordering """ return searching.breadth_first_search(self, root, filter=filter)
def depth_first_search(self, root=None, filter=filters.null()): """ Depth-first search. @deprecated: This method will be removed in further versions. Use L{pygraph.algorithms.pygraph.algorithms.searching.depth_first_search} instead. @type root: node @param root: Optional root node (will explore only root's connected component) @rtype: tuple @return: tupple containing a dictionary and two lists: 1. Generated spanning tree 2. Graph's preordering 3. Graph's postordering """ return searching.depth_first_search(self, root, filter=filter)