Class: Tree::NestedArrayTree

Inherits:
AbstractTree show all
Includes:
DownTreeAlgorithms, ExternalChildrenArrayImplementation
Defined in:
lib/modular_tree.rb

Overview

TODO: Hide

Instance Attribute Summary

Attributes included from ExternalChildrenArrayImplementation

#array

Class Method Summary collapse

Instance Method Summary collapse

Methods included from DownTreeFilteredAlgorithms

#accumulate, #aggregate, #choose, #descendants, #each, #edges, #nodes, #pairs, #postorder, #preorder, #select, #size, #traverse

Methods included from BranchesProperty

#bare?, #branches, #each_branch

Methods included from NodeProperty

#node, #node_value

Methods included from ExternalChildrenArrayImplementation

#attach, #branches, #children, #each, #each_branch, #each_child, #each_edge, #each_node, new, #node, #node_value, #this

Methods included from ChildrenImplementation

#attach

Methods included from ChildrenProperty

#attach, #children, #detach, #each_child

Methods inherited from AbstractTree

#empty?, #size

Constructor Details

#initialize(array) ⇒ NestedArrayTree

Returns a new instance of NestedArrayTree.



66
67
68
69
# File 'lib/modular_tree.rb', line 66

def initialize(array)
  super(nil)
  self.array = array
end

Class Method Details

.filter(*args) ⇒ Object



71
# File 'lib/modular_tree.rb', line 71

def self.filter(*args) = DownTreeAlgorithms.filter(*args)