From c5289accb8a27ca2cce537019e5bd4f37fef157e Mon Sep 17 00:00:00 2001
From: Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com>
Date: Tue, 3 Jan 2017 23:22:48 -0500
Subject: Add get_vertices

---
 src/graph.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/graph.h b/src/graph.h
index 9df4b9f..8c04606 100644
--- a/src/graph.h
+++ b/src/graph.h
@@ -16,6 +16,17 @@ public:
         graph_[from].push_back(to);
     }
 
+    std::set<int> get_vertices() {
+        std::set<int> vertices;
+
+        for (auto vertex : graph_) {
+            vertices.insert(vertex.first);
+        }
+
+        return vertices;
+    }
+
+
     std::vector<int> const& get_neighbors(int vertex) {
         return graph_[vertex];
     }
-- 
cgit v1.2.3