我应该使用哪个C ++图形库? [英] Which C++ graph library should I use?

查看:181
本文介绍了我应该使用哪个C ++图形库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找到了以下图形库,但我不知道应该使用哪一个。也许还有更多...





应该做什么:




  • 画一个无向网络


  • 输入格式应为用户可编辑的

  • 可视化是由一些能够输出格式的其他应用程序完成的。



Graphviz是我尝试过的唯一一个,发现没有静态lib为它,我没有建立它由我自己,和文档可以更好。因此,我环顾四周,发现了其他三个库。



我很高兴得到一些建议选择哪个库。



编辑:

我不知道我需要哪些组件。我想实现以下:我的应用程序解析网络设备信息,然后它计算所有设备的邻居表。这个邻居表应该可视化。这将是很好得到两个输出格式 - 一个图片(即PNG,GIF或JPEG ...)和用户可编辑的格式。对于最后提到的,用户然后将启动第三方应用程序以编辑图形。但是图形计算应该通过使用的图形lib来完成。



也许我太天真了,但是如果是这样的话,请澄清我失踪了。



strong> EDIT#2

添加了OGDF

解决方案

并决定使用带GML输出的OGDF



我没有使用其他人的原因




  • Graphviz:开销太大。静态库是强制性的,这是几乎不可能与Graphviz。除了库之外还需要许多附加组件。 GraphViz的唯一功能我想要的是丰富的输出格式。

  • Boost图表库:在我看来非常复杂。通常我非常喜欢Boost库。

  • Lemon:似乎没有布局算法。

  • 为什么选择GML?

    有一些免费的支持GML的图形应用程序(yEd,GoVisual Diagramm Editor)。我的工具只生成图形,然后应该在其他地方编辑。



    EDIT:现在有一个GML转换工具可用: http://www.ogdf.net/doku.php/project:gml2pic 。支持的输出格式是JPG,PNG,TIFF,SVG,PDF,EPS ...


    I found the following graph libraries, but I am not sure which one I should use. Maybe there are some more...

    What it should do:

    • Draw an undirected network map
    • Come as header only or static lib for Windows
    • The output format should be user editable
    • Visualization is then done by some other application which is capable of the output format

    Graphviz is the only one I tried so far, but I found no static lib for it, I failed to build it by my own, and the documentation could be better. Therefore I looked around and found these other three libs.

    I would be glad to get some recommendations on which lib to choose.

    EDIT:
    I am not sure which components I need. I want to achieve the following: Network device information is parsed by my application and then it computes a neighborship table of all devices. This neighborship table should then be visualized. It would be nice to get two output formats - a picture (i.e. PNG, GIF, or JPEG...) and a user-editable format. For the last mentioned, the user will then start a third-party application to edit the graph. But graph computation should be done by the graph lib used.

    Maybe I am too naive, but if this the case, please clarify what I am missing.

    EDIT #2
    Added OGDF

    解决方案

    I now tested the libs mentioned above and decided to use OGDF with GML output.

    Reasons why I didn't use one of the others:

    • Graphviz: Too much overhead. a static lib is mandatory for me and this is hardly possible with Graphviz. There are many additional components needed besides the library. The only functionality of GraphViz I would like to have is the rich number of output formats.
    • Boost Graph Library: Very complicated in my opinion. Normally I like the Boost libs very much.
    • Lemon: There seem to be no layout algorithms.
    • igraph: Would also work, but OGDF seems to be easier to use.

    Why GML?
    There are some free graph applications (yEd, GoVisual Diagramm Editor) which support GML. My tool only generates the graph and it should then be edited elsewhere.

    EDIT: There is now a GML convertion tool available: http://www.ogdf.net/doku.php/project:gml2pic. The supported output formats are JPG, PNG, TIFF, SVG, PDF, EPS...

    这篇关于我应该使用哪个C ++图形库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆