From 59e63a6530ee905bde6c4cb767e72b3c881c0275 Mon Sep 17 00:00:00 2001 From: Denes Matetelki Date: Wed, 8 May 2013 21:56:19 +0200 Subject: [PATCH] Graph::resize to be able to allocate memory for vertices when their number is known in advance --- graph.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/graph.hpp b/graph.hpp index 8638a9c..3159287 100644 --- a/graph.hpp +++ b/graph.hpp @@ -60,6 +60,7 @@ public: bool empty() const { return m_vertices.empty(); } size_type numberOfVertices() const { return m_vertices.size(); } size_type numberOfEdges() const; + void resize(size_type size) { m_vertices.resize(size); } // Modifiers bool addVertex(const_reference data);