Class: CompSci::TernaryTree

Inherits:
NaryTree show all
Defined in:
lib/compsci/tree.rb

Instance Attribute Summary

Attributes inherited from NaryTree

#child_slots

Attributes inherited from Tree

#root

Instance Method Summary collapse

Methods inherited from NaryTree

#display, #open_parent, #open_parent?, #open_sibling, power_of?, #push

Methods inherited from Tree

#bf_search, #df_search, #df_search_generic

Constructor Details

#initialize(node_class, val) ⇒ TernaryTree

Returns a new instance of TernaryTree.



132
133
134
# File 'lib/compsci/tree.rb', line 132

def initialize(node_class, val)
  super(node_class, val, child_slots: 3)
end