我有使用 boost 图形库的 C++ 程序。我想知道是否有任何方法可以在节点中包含的某个位置值之后可视化图形(节点和可选的边)。请查看下面的图像示例以了解我想要可视化的内容:http: //img11.hostingpics.net/pics/647608graphViz.png
谢谢。
我有使用 boost 图形库的 C++ 程序。我想知道是否有任何方法可以在节点中包含的某个位置值之后可视化图形(节点和可选的边)。请查看下面的图像示例以了解我想要可视化的内容:http: //img11.hostingpics.net/pics/647608graphViz.png
谢谢。
You're in luck.
Boost graph can serialize to and deserialize from the dot
language (which is the language used by GraphViz). There are several examples in the (free) Boost Graph Library book and on the site.
See e.g.: http://www.boost.org/doc/libs/release/libs/graph/doc/write-graphviz.html
If you take the output of the sample on the previous webpage and run
dot -Tpng dot > test.png
You'll get something like the following picture:
Here is a direct link to an example using dynamic properties