0

I am new to graph theory and graph concept. I am workign on something, that requires me to create a mesh(Undirected graphs) with n number of nodes. Once the structure is created, I would be running various algorithms on the structure, to find a shortest path from a node to other. No for this I have decided to use Boost graph librabry. I read through the online documentation. The online documentation is good but at the same time not sufficient. I went through various examples online and everywhere, they import the graph from Graphviz.

If i am not wrong, we have to manually draw or write a dot program to get a graph in Graphviz and import in .dot format(Please correct me if i am wrong)

But is there a way in Boost where I could create a graph, instead of importing it from GraphViz? And I would let user to decide the number of vertices in it, instead of pre-defining it.

Any help would be very much appreciated. Thanks a ton in advance.

4

1 回答 1

0

这可能不是很正确,但我之前给出了一个回应。

https://stackoverflow.com/a/3100220/202083

您可以了解如何以编程方式添加节点和边。

我希望这足以让你开始。

于 2012-08-23T15:02:23.363 回答