Graph::resize to be able to allocate memory for vertices when their number is known in advance

for/release
Denes Matetelki 12 years ago
parent f0710ec710
commit 59e63a6530

@ -60,6 +60,7 @@ public:
bool empty() const { return m_vertices.empty(); } bool empty() const { return m_vertices.empty(); }
size_type numberOfVertices() const { return m_vertices.size(); } size_type numberOfVertices() const { return m_vertices.size(); }
size_type numberOfEdges() const; size_type numberOfEdges() const;
void resize(size_type size) { m_vertices.resize(size); }
// Modifiers // Modifiers
bool addVertex(const_reference data); bool addVertex(const_reference data);

Loading…
Cancel
Save