This week's book giveaway is in the Python forum.
We're giving away four copies of Python Continuous Integration and Delivery and have Moritz Lenz on-line!
See this thread for details.
Win a copy of Python Continuous Integration and Delivery this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

Given nodes and edges, make a map  RSS feed

 
Ranch Hand
Posts: 483
Chrome Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a bunch of nodes and edges and need to make a decent human readable map out of them.  Does anyone know of an algorithm that will map the nodes in such a way edge overlap is minimized?  Map as in I can print the result with the nodes emphasized and minimal edge crossing.

Currently going through Skiena's Algorithm Design, which by the way is a fricken excellent book on algorithms (examples are in C for my edition, the concepts carry, wish I'd found it 30 years ago but as it's 20 years old, well...), not finding what I need.

Input is something like:
1 (2, 3, 4)
2 (8, 9, 12)
3 (1, 12, 18)
4 (1, unknown)
12 (2, 3, unknown)

In other words, the input is a node followed by a list of nodes it connects to.  Don't read too much into that example, I pulled it out of my hat.  But as you can see from node 12 it's common for 2 or more nodes to connect to an unknown node.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!