Edge crossing reduction in graph

我的未来我决定 提交于 2019-11-29 19:05:28

问题


I'd like to ask you if there are any algorithms how to minimize edge crossings in graph, for example if I have a transition matrix of the graph.

I found methods like trying to place the nodes around the other node, but I'd like to know some other ideas. Thanks.


回答1:


There's a range of well established algorithms/libraries that have been developed for graph drawing applications, you can get a bit of background here.

To draw undirected graphs a popular choice is the force-based layout algorithm, in which graph edges are treated as springs (attractive forces) while the vertices are treated like charged particles (applying repulsive forces). The algorithm works by updating the vertex positions based on these forces until a steady-state is reached. You can read more about force based methods here. Since these algorithms search for an equilibrium solution they often result in pseudo-optimal layouts, without much edge tangling.

You might be interested in making use of one of the many graph drawing libraries that are available. The Graphviz package is generally pretty good and supports a number of different algorithms for different graph drawing applications.



来源:https://stackoverflow.com/questions/13963073/edge-crossing-reduction-in-graph

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!