lib/rsyntaxtree/graph.rb
# Calculate the width of all elements in a certain level

Calculate the width of all elements in a certain level
Calculate the width of all elements in a certain level
def calc_level_width(level)
    w = 0
    e = @e_list.get_first
    while e
      if(e.level == level)
        w += calc_element_width(e)
      end
        e = @e_list.get_next
    end
    return w
  end
def calc_level_width ( level ) w = 0 e = @e_list . get_first while e if ( e . level == level ) w += calc_element_width ( e ) end e = @e_list . get_next end return w end
Calculate the width of all elements in a certain level
Calculate the width of all elements in a certain level
level
<not_specific>