Method: Bio::Tree#children
- Defined in:
- lib/bio/tree.rb
#children(node, root = nil) ⇒ Object
Gets the adjacent children nodes of the node. If root isn’t specified or root is nil, @root is used. Returns an array of Nodes. The result is unspecified for cyclic trees.
636 637 638 639 640 641 642 |
# File 'lib/bio/tree.rb', line 636 def children(node, root = nil) root ||= @root path = self.path(root, node) result = self.adjacent_nodes(node) result -= path result end |