public AdjacencyListGraph(IEnumerable <Vertex> vertices, IEnumerable <Edge> edges, GraphType typ) { m_Vertices = new List <Vertex>(); m_Edges = new Dictionary <Vertex, List <Edge> >(); Type = typ; EdgeCount = 0; // add given vertices and edges in order foreach (var v in vertices) { AddVertex(v); } foreach (var e in edges) { AddEdge(e); } }
public AdjacencyListGraph(IEnumerable <Vertex> vertices, GraphType typ) : this(vertices, new List <Edge>(), typ) { }
public AdjacencyListGraph(GraphType typ) : this(new List <Vertex>(), typ) { }