public Graph(params Vertex <T>[] vertices) { this.vertices = new VerticesSetList <T>(); foreach (Vertex <T> vertex in vertices) { this.vertices.Add(vertex); } edges = new List <Edge <T> >(); }
public Graph(List <Vertex <T> > vertices, List <Edge <T> > edges) { this.vertices = new VerticesSetList <T>(); foreach (Vertex <T> vertex in vertices) { this.vertices.Add(vertex); } this.edges = new List <Edge <T> >(); foreach (var edge in edges) { this.AddEdge(edge); } }
public Graph() { vertices = new VerticesSetList <T>(); edges = new List <Edge <T> >(); }