我正在使用捆绑属性和 adjacency_list 并且想使用子图类。
struct Vertex
{
int index;
int seed;
};
struct Edge
{
bool visted;
double weight;
};
typedef adjacency_list<listS, listS, undirectedS, Vertex, property<edge_index_t,int,Edge> > Graph;
typedef subgraph<Graph> testSubgraph;
The property<edge_index_t,int,Edge>
需要部分,因为子图需要edge_index_t
比较两条边。
现在我的问题是如何使用子图中的捆绑属性添加边?
在没有的正态图中property<edge_index_t,int,Edge>
我添加了一条边,如下所示:
Edge e;
vertex_descriptor u,v;
// fill in u and v;
e.weight = 1.0;
e.visted=false;
add_edge(u,v,e,graph);
但这对于 Subgraph 不起作用。
希望有人知道这个问题的解决方案。
Thanks
Ben