1

我有一个程序,我需要在其中反复销毁和恢复图表。我已将其声明为

typedef boost::adjacency_list<boost::hash_mapS, boost::vecS, boost::undirectedS, VertexProperties> Graph;

我想做的是将 EdgeOutList 复制hash_map到一个单独的变量中,然后将其复制回去以恢复它。我一直在使用copy_graph完整的图表,但它必须以这种方式重新分配所有内容,我更愿意将 edge_list 复制到原始对象。

这种程序似乎没有任何文档,尽管我可能不明白一些东西。

4

0 回答 0