예제 #1
0
        public VertexList <T> Clone()
        {
            VertexList <T> newList = new VertexList <T>();

            for (int i = 0; i < Items.Count; i++)
            {
                newList.Add(this[i]);
            }
            return(newList);
        }
예제 #2
0
파일: Graph.cs 프로젝트: jsnelcer/Graph
 public Graph(VertexList <T> vertexSet)
 {
     if (vertexSet == null)
     {
         this.vertexSet = new VertexList <T>();
     }
     else
     {
         this.vertexSet = vertexSet;
     }
 }
예제 #3
0
 public Vertex(T value, VertexList <T> neighbours)
 {
     this.Value      = value;
     this.Neighbours = neighbours;
 }