/** Calculate the width of the subtree rooted at this node. */ public int treeWidth() { int width = 0; if (this._childCount > 0) { SafraTreeNode it = this._oldestChild; while (it != null) { SafraTreeNode cur_child = it; width += cur_child.treeWidth(); it = it._youngerBrother; } } else { width = 1; } return(width); }