Commit c9afd8cc authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Fix bug in graph_copy()

parent e9ebd2f4
......@@ -61,6 +61,7 @@ struct retrieve_from_list
return;
}
graph_copy(glist.back(), g);
glist.pop_back();
}
};
......
......@@ -157,7 +157,7 @@ void graph_copy(const GraphOrig& g, GraphTarget& gt)
typename property_map<GraphOrig, vertex_index_t>::type index = get(vertex_index, g);
typedef typename graph_traits<GraphOrig>::vertex_descriptor vertex_t;
typedef typename graph_traits<GraphTarget>::vertex_descriptor tvertex_t;
vector<tvertex_t> vmap;
vector<tvertex_t> vmap(num_vertices(g));
typename graph_traits<GraphOrig>::vertex_iterator v, v_end;
for (tie(v, v_end) = vertices(g); v != v_end; ++v)
vmap[index[*v]] = add_vertex(gt);
......
......@@ -248,7 +248,7 @@ def extended_clustering(g, props=None, max_depth=3, undirected=False):
>>> clusts = gt.extended_clustering(g, max_depth=5)
>>> for i in range(0, 5):
... print(gt.vertex_average(g, clusts[i]))
...
...
(0.0058850000000000005, 0.0004726257592782405)
(0.026346666666666668, 0.0009562588213100747)
(0.11638833333333333, 0.002086419787711849)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment