For the N-ary tree drawing algorithm (Buchheim's), in the move_subtree function, there is a line subtrees = wr.number - wl.number. Subsequently, there is a shift / subtrees, which may result in a divided by 0 error, when wr.number == wl.number. How should I cope with this?
For the N-ary tree drawing algorithm (Buchheim's), in the
move_subtree
function, there is a linesubtrees = wr.number - wl.number
. Subsequently, there is ashift / subtrees
, which may result in a divided by 0 error, whenwr.number == wl.number
. How should I cope with this?