Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public Graph(VertexList <T> vertexSet)
 {
     if (vertexSet == null)
     {
         this.vertexSet = new VertexList <T>();
     }
     else
     {
         this.vertexSet = vertexSet;
     }
 }
Exemplo n.º 3
0
 public Vertex(T value, VertexList <T> neighbours)
 {
     this.Value      = value;
     this.Neighbours = neighbours;
 }