Return a list of elements contained in the nodes.
487017
public List<T> getElements() {
		ArrayList<T> list = new ArrayList<>(nodes.size());
		for (Node<T> node : nodes)
			list.add(node.element);
		return list;
	}
	
	/** Return the number of elements. */
	public int size() { return nodes.size(); }
	
}
1339312
def get_children(self, depth=1):
        """"""
        yield self
        if depth == 0: return
        for child in self.children.values():
            for node in child.get_children(depth-1): yield node
316375
def powernodes(self) -> iter:
        """"""
        yield from (elem for elem, subs in self.inclusions.items() if subs != ())
81373
def nodes(self, node=None):
        ''''''
        if node is None:
            for root in self.stack:
                yield from self.nodes(root)
        else:
            yield node
            if node.is_container():
                for child in node.children:
                    yield from self.nodes(child)
746762
def getnodes(self, name):
        "'"
        for node in self.nodes:
            if striptag(node.tag) == name:
                yield node
631301
function(nodes) {
      nodes = nodes || [];

      var results = [];
      for (var i = 0; i < nodes.length; ++i) {
        results.push(nodes.item(i));
      }
      return results;
    }
596484
def roots(self):
      """"""
      return [x for x in self._nodes.values() if x.id not in self._c2p]
221284
function(nodes) {
			var node, groups = [];

			function containedby(target, others) {
				return others.some(function(other) {
					return gui.DOMPlugin.contains(other, target);
				});
			}
			while ((node = nodes.pop())) {
				if (!containedby(node, nodes)) {
					groups.push(node);
				}
			}
			return groups;
		}
1314783
def get_nodes(graph: BELGraph, node_predicates: NodePredicates) -> Set[BaseEntity]:
    """"""
    return set(filter_nodes(graph, node_predicates=node_predicates))
857750
def node_labels(self):
        """"""
        assert list(self.node_indices)[0] == 0
        labels = list("m{}".format(i) for i in self.node_indices)
        return NodeLabels(labels, self.node_indices)
630639
def elements(self):
        """"""
        return (self.gs1_prefix, self.registration_group, self.registrant,
                self.publication, self.check_digit)
497350
def getElements(self, node, name, nsuri=None):
        """"""
        nsmatch = self.nsUriMatch
        result = []
        ELEMENT_NODE = node.ELEMENT_NODE
        for child in node.childNodes:
            if child.nodeType == ELEMENT_NODE:
                if ((child.localName == name or name is None) and (
                    (nsuri is None) or nsmatch(child.namespaceURI, nsuri))):
                    result.append(child)
        return result
117106
def elements(self):
        """"""
        return (self.country_code, self.check_digits, self.bank_identifier,
                self.bank_account_number)
849568
def parents(self, node):
        """"""
        return [
            parent for parent in
            getattr( node, 'parents', [] )
            if getattr(parent, 'tree', self.TREE) == self.TREE
        ]
1090234
def get_elements(nodelist):
    

    element_list = []
    for node in nodelist:
        if node.nodeType == Node.ELEMENT_NODE:
            element_list.append(node)

    return element_list
581367
def data_nodes(self):
        

        return {k: v for k, v in self.nodes.items() if v['type'] == 'data'}
965659
def _get_whole_subtrees(self):
        
        subtrees = []
        loose_leaves = len(self.leaves) - 2**int(log(len(self.leaves), 2))
        the_node = self.root
        while loose_leaves:
            subtrees.append(the_node.l)
            the_node = the_node.r
            loose_leaves = loose_leaves - 2**int(log(loose_leaves, 2))
        subtrees.append(the_node)
        return subtrees