【发布时间】:2015-02-26 10:37:33
【问题描述】:
我正在使用QuickGraph .NET library,它是 boost (C++) 图形库的克隆,但我有一些问题,因为我对这个库完全陌生
1- 我将如何在 QucikGraph 中表示无向图?我发现您可以使用以下方法轻松完成提升:
adjacency_list<boost::vecS, boost::vecS, boost::undirectedS> Graph;
2-我将如何为顶点分配值我有兴趣将整数值附加到顶点,但我不知道如何做到这一点:
AdjacencyGraph graph = new AdjacencyGraph(new VertexAndEdgeProvider(), false);//I'm not sure about the proper value of this boolean
IVertex u = graph.AddVertex();// here I'm adding vertex to 'graph' but with no value
IVertex v = graph.AddVertex();// here also I'm doing the same thing but without assigning any value to vertex v
graph.AddEdge(u, v);
【问题讨论】:
标签: c# c++ boost boost-graph quickgraph