示例#1
0
 public bool AddVertex(int val, object data = null)
 {
     if (root != null)
     {
         root.GetEnd().Next = new VertexWirth(GetKey(), val, data);
     }
     else
     {
         root = new VertexWirth(GetKey(), val, data);
     }
     return(true);
 }
示例#2
0
 public VertexWirth GetEnd()
 {
     if (Next == null)
     {
         return(this);
     }
     return(Next.GetEnd());
 }
示例#3
0
 public bool AddVertex(int val)
 {
     root.GetEnd().Next = new VertexWirth(GetKey(), val);
     return(true);
 }