开发者

Algorithm for best positioning objects on a Visio model

开发者 https://www.devze.com 2022-12-29 07:07 出处:网络
I am trying to map all network devices and create a visio file with the resulting network topology. I was wondering if there are any algorithm for best positioning the nodes on the graph, considering

I am trying to map all network devices and create a visio file with the resulting network topology.

I was wondering if there are any algorithm for best positioning the nodes on the graph, considering its connections.

Connections are bidirectional, like this (may have many connections between the same nodes):

---------          ---------
|       |  开发者_如何学Python        |       |
|   A   |----------|   B   |
|_______|          |_______|


The Wikipedia entry Force-based algorithms is a good start.


This is covered in Programming Collective Intelligence by Toby Seagaran. In Chapter 5's examples, socialnetwork.py shows how to draw such a graph by taking things into account like counting crossed lines and how to display a graph by minimizing intersections.

0

精彩评论

暂无评论...
验证码 换一张
取 消