public TreeNode(TreeNode t) { this.r = t.r; this.c = t.c; this.lastValue = t.lastValue; this.parent = t.parent; }
public TreeNode(int r, int c, int v) { this.r = r; this.c = c; this.lastValue = v; this.parent = null; }
public void setChildren() { this.children = new List<TreeNode>(); foreach (TreeNode t in parent.children) { TreeNode newChild = new TreeNode(t); newChild.setParent(this); this.children.Add(newChild); } }
public void setParent(TreeNode parent) { this.parent = parent; }