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.
精彩评论