diff options
author | Toby Vincent <tobyv13@gmail.com> | 2021-03-26 18:15:57 +0000 |
---|---|---|
committer | Toby Vincent <tobyv13@gmail.com> | 2021-03-26 18:15:57 +0000 |
commit | 1c2b72905bb59c911ddbbb99075eaa19f601decb (patch) | |
tree | 499b2bddcb20fe42f21365a55759cd4d476e69e3 /Graph.cs | |
parent | 55516440aa3a41b91963bbf97dfa17cbb1e1dcca (diff) |
added constructors
Diffstat (limited to 'Graph.cs')
-rw-r--r-- | Graph.cs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -7,6 +7,13 @@ namespace Graph { public List<Vertex<T>> Vertices { get; set; } = new List<Vertex<T>>(); + public Graph() { } + + public Graph(List<Vertex<T>> vertices) + { + Vertices = vertices; + } + public void AddEdge(Edge<T> edge) { Vertex<T> vertex = Vertices.Find(u => u.Id == edge.U); |