From 04bc75cd40b7d010a428e06af8af54d54def983f Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Fri, 9 Nov 2001 14:41:02 +0000 Subject: [PATCH] some bug fixes from Rich [SVN r11641] --- include/boost/graph/subgraph.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/boost/graph/subgraph.hpp b/include/boost/graph/subgraph.hpp index b5c38ea5..e769dcce 100644 --- a/include/boost/graph/subgraph.hpp +++ b/include/boost/graph/subgraph.hpp @@ -98,11 +98,18 @@ namespace boost { subgraph(vertices_size_type n, const graph_property_type& p = graph_property_type()) : m_graph(n, p), m_parent(0), m_edge_counter(0), m_global_vertex(n) - { } + { + std::vector::iterator b = m_global_vertex.begin(); + std::vector::iterator e = m_global_vertex.end(); + for(vertices_size_type i = 0; b != e; ++b) + *b = i++; + } // copy constructor subgraph(const subgraph& x) - : m_graph(x.m_graph), m_parent(x.m_parent), m_edge_counter(x.m_edge_counter) + : m_graph(x.m_graph), m_parent(x.m_parent), + m_edge_counter(x.m_edge_counter), + m_global_vertex(x.m_global_vertex) { // Do a deep copy for (std::list< subgraph*>::iterator i = x.m_children.begin();