升压功能boost::graph::copy_graph在其参数描述提供顶点映射参数来提高::图表:: copy_graph
template <class VertexListGraph, class MutableGraph> void
copy_graph(const VertexListGraph& G, MutableGraph& G_copy,
const bgl_named_params<P, T, R>& params = all defaults)
列表 UTIL/OUT: orig_to_copy(Orig2CopyMap c)
其不同于拷贝顶点在顶点原来的映射。我需要这个映射!
(滚动到底在http://www.boost.org/doc/libs/1_55_0/libs/graph/doc/copy_graph.html)
如何访问/提供这最后一个参数orig_to_copy?你能给出一个代码示例,即为我完成此代码?
void doSomething(graph_t& g){
graph_t g_copy;
copy_graph(g, g_copy, [...???...]);
// here I would like to access the Orig2CopyMap
}
我在这里得到一个segfault。我认为这个问题是需要在IsoMap里面,像一个支持属性映射的std :: map。我在这里找到了一个工作解决方案:http://d.hatena.ne.jp/gununu/20111006/1317880754 – hooch
谢谢,我错过了属性图背后的容器(isoValues)。现在代码正常工作。 –