def breadth_first_search(self, root=None, filter=filters.null()): """ Breadth-first search. @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()): """ Depht-first search. @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)
def depth_first_search(self, root=None, filter=filters.null()): """ Depht-first search. @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)