コード例 #1
0
 public TreeNode(TreeNode t)
 {
     this.r = t.r;
     this.c = t.c;
     this.lastValue = t.lastValue;
     this.parent = t.parent;
 }
コード例 #2
0
 public TreeNode(int r, int c, int v)
 {
     this.r = r;
     this.c = c;
     this.lastValue = v;
     this.parent = null;
 }
コード例 #3
0
 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);
     }
 }
コード例 #4
0
 public void setParent(TreeNode parent)
 {
     this.parent = parent;
 }