Generate leaf nodes of this node.
174844
def generate_child_leaf_nodes(self):
        

        def _yield_child_leaf_nodes(node):
            """

            Args:
                node:

            Yields:
            """
            if not node.has_children():
                yield node
            else:
                for child_node in node.generate_child_nodes():
                    # recursivity is not compatible with yield in Python2.x: you have to re-yield results
                    for child in _yield_child_leaf_nodes(child_node):
                        yield child

        return _yield_child_leaf_nodes(self)
746803
def each
      traverse do |node, position, stack|
        if node.is_leaf? && position < node.keys.size
          yield(node.keys[position], node.values[position])
        end
      end
    end
162217
def all_leaves(self, graph=None):
        
        if graph is None:
            graph = self.graph
        return [key for key in graph if not graph[key]]
813510
public static List<Object> getLeafNodes(TreeModel treeModel, Object node)
    {
        List<Object> leafNodes = new ArrayList<Object>();
        getLeafNodes(treeModel, node, leafNodes);
        return leafNodes;
    }
316375
def powernodes(self) -> iter:
        """"""
        yield from (elem for elem, subs in self.inclusions.items() if subs != ())
652828
def populate(self, node_generator):
        
        for data in node_generator:
            hashed = hash_byte_array(data)
            self.tree.add_leaf(hashed)
777484
def subtree_leaf_positions(subtree):
    """"""
    relative_leaf_positions = subtree.treepositions('leaves')
    subtree_root_pos = subtree.treeposition()
    absolute_leaf_positions = []
    for rel_leaf_pos in relative_leaf_positions:
        absolute_leaf_positions.append( subtree_root_pos + rel_leaf_pos)
    return absolute_leaf_positions
420523
def lines_from_tree(tree, nodes_and_set:bool=False) -> iter:
    """"""
    NODE = 'NODE\t{}'
    INCL = 'IN\t{}\t{}'
    EDGE = 'EDGE\t{}\t{}\t1.0'
    SET  = 'SET\t{}'

    if nodes_and_set:
        for node in tree.nodes():
            yield NODE.format(node)

        for node in tree.powernodes():
            yield SET.format(node)

    for node, includeds in tree.inclusions.items():
        for included in includeds:
            yield INCL.format(included, node)

    for node, succs in tree.edges.items():
        for succ in succs:
            yield EDGE.format(node, succ)
660049
private void getLeafNodes(N node, List<E> result, int currentLevel) {
    // Level 1 are the leaf nodes, Level 2 is the one atop!
    if(currentLevel == 2) {
      for(int i = 0; i < node.getNumEntries(); i++) {
        result.add(node.getEntry(i));
      }
    }
    else {
      for(int i = 0; i < node.getNumEntries(); i++) {
        getLeafNodes(getNode(node.getEntry(i)), result, (currentLevel - 1));
      }
    }
  }
866757
private static List<JoinNode> generateInnerJoinOrdersForTree(JoinNode subTree) {
        // Get a list of the leaf nodes(tables) to permute them
        List<JoinNode> tableNodes = subTree.generateLeafNodesJoinOrder();
        List<List<JoinNode>> joinOrders = PermutationGenerator.generatePurmutations(tableNodes);
        List<JoinNode> newTrees = new ArrayList<>();
        for (List<JoinNode> joinOrder: joinOrders) {
            newTrees.add(JoinNode.reconstructJoinTreeFromTableNodes(joinOrder, JoinType.INNER));
        }
        //Collect all the join/where conditions to reassign them later
        AbstractExpression combinedWhereExpr = subTree.getAllFilters();
        List<JoinNode> treePermutations = new ArrayList<>();
        for (JoinNode newTree : newTrees) {
            if (combinedWhereExpr != null) {
                newTree.setWhereExpression(combinedWhereExpr.clone());
            }
            // The new tree root node id must match the original one to be able to reconnect the
            // subtrees
            newTree.setId(subTree.getId());
            treePermutations.add(newTree);
        }
        return treePermutations;
    }
1291252
private void createNodePaths() {
    TreeTraverser<OWLClassContainer> traverser =
        new TreeTraverser<OWLClassContainer>() {
          @Override
          public Iterable<OWLClassContainer> children(OWLClassContainer container) {
            int count = 0;
            List<OWLClassContainer> containers = new ArrayList<>();
            for (OWLClass childClass : loader.getChildClass(container.getOwlClass())) {
              containers.add(
                  new OWLClassContainer(
                      childClass, constructNodePath(container.getNodePath(), count), false));
              count++;
            }
            return containers;
          }
        };

    OWLClass pseudoRootClass = loader.createClass(PSEUDO_ROOT_CLASS_LABEL, loader.getRootClasses());

    for (OWLClassContainer container :
        traverser.preOrderTraversal(
            new OWLClassContainer(pseudoRootClass, PSEUDO_ROOT_CLASS_NODEPATH, true))) {
      OWLClass ontologyTerm = container.getOwlClass();
      String ontologyTermNodePath = container.getNodePath();
      String ontologyTermIRI = ontologyTerm.getIRI().toString();
      OntologyTermNodePath nodePathEntity = createNodePathEntity(container, ontologyTermNodePath);
      nodePathsPerOntologyTerm.put(ontologyTermIRI, nodePathEntity);
    }
  }
596484
def roots(self):
      """"""
      return [x for x in self._nodes.values() if x.id not in self._c2p]
1069991
private KdTree.Node createLeaf(List<P> points , GrowQueue_I32 indexes ) {
		int index = indexes == null ? -1 : indexes.get(0);
		return memory.requestNode(points.get(0),index);
	}
995
def _parse_leaves(self, leaves) -> List[Tuple[str, int]]:
        """"""
        return [(self._leaf_name(leaf), 0) for leaf in leaves]
651160
def calculate_leaf_paths(self):
        
        reverse_xref = {}
        leaves = set()
        for v in self.value.values():
            if v.leaf:
                leaves.add(v)
            for xref in v.value_xref:
                reverse_xref.setdefault(xref, []).append(v.ident)
        for leaf in leaves:
            self.calculate_leaf_path(leaf, reverse_xref)
982603
def _make_nodes(root):
    '''
    
    '''
    dirs = (
        ('{0}/etc'.format(root), 'root', 'root', '755'),
        ('{0}/dev'.format(root), 'root', 'root', '755'),
        ('{0}/proc'.format(root), 'root', 'root', '755'),
        ('{0}/dev/pts'.format(root), 'root', 'root', '755'),
        ('{0}/dev/shm'.format(root), 'root', 'root', '1755'),
    )

    nodes = (
        ('{0}/dev/null'.format(root), 'c', 1, 3, 'root', 'root', '666'),
        ('{0}/dev/zero'.format(root), 'c', 1, 5, 'root', 'root', '666'),
        ('{0}/dev/random'.format(root), 'c', 1, 8, 'root', 'root', '666'),
        ('{0}/dev/urandom'.format(root), 'c', 1, 9, 'root', 'root', '666'),
        ('{0}/dev/tty'.format(root), 'c', 5, 0, 'root', 'root', '666'),
        ('{0}/dev/tty0'.format(root), 'c', 4, 0, 'root', 'root', '666'),
        ('{0}/dev/console'.format(root), 'c', 5, 1, 'root', 'root', '600'),
        ('{0}/dev/full'.format(root), 'c', 1, 7, 'root', 'root', '666'),
        ('{0}/dev/initctl'.format(root), 'p', 0, 0, 'root', 'root', '600'),
        ('{0}/dev/ptmx'.format(root), 'c', 5, 2, 'root', 'root', '666'),
    )

    for path in dirs:
        __salt__['file.mkdir'](*path)

    for path in nodes:
        __salt__['file.mknod'](*path)
94904
private function getRootNodes()
    {
        $output = array();
        foreach( $this->nodes as $node )
            if (! $node->parentCount() )
                $output[] = $node;
        return $output;
    }