Method: BiDimensionalTree#balanced_horiz?
- Defined in:
- lib/bi-dimensional-access.rb
#balanced_horiz? ⇒ Boolean
Return true if tree is balanced, in other word, if the number of branchs is smaller than 2 raised to the tree’s depth
201 202 203 |
# File 'lib/bi-dimensional-access.rb', line 201 def balanced_horiz? number_nodes_horiz.between?(2**(get_depth_horiz - 1), 2**get_depth_horiz) end |