lazytree/lazytree.py
def iddfs(self, max_depth=float('inf'), flatten=True, randomize=False):
        """Iterative deepening depth-first search."""
        depth = 0
        while depth <= max_depth:
            nodes = self.leaves(max_depth=depth, randomize=randomize)
            if flatten:
                yield from nodes
            else:
                yield tuple(nodes)
            depth += 1
Iterative deepening depth-first search.
Iterative deepening depth-first search.
Iterative deepening depth - first search .
def iddfs(self, max_depth=float('inf'), flatten=True, randomize=False):
        depth = 0
        while depth <= max_depth:
            nodes = self.leaves(max_depth=depth, randomize=randomize)
            if flatten:
                yield from nodes
            else:
                yield tuple(nodes)
            depth += 1
def iddfs ( self , max_depth = float ( 'inf' ) , flatten = True , randomize = False ) : depth = 0 while depth <= max_depth : nodes = self . leaves ( max_depth = depth , randomize = randomize ) if flatten : yield from nodes else : yield tuple ( nodes ) depth += 1
Iterative deepening depth-first search.
Iterative deepening depth - first search .
"""Iterative deepening depth-first search."""
self
max_depth
flatten
randomize