This week's book giveaway is in the Beginning Java forum.
We're giving away four copies of Get Programming with Java (MEAP only) and have Peggy Fisher on-line!
See this thread for details.
Win a copy of Get Programming with Java (MEAP only) this week in the Beginning Java 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Given nodes and edges, make a map  RSS feed

Ranch Hand
Posts: 447
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.

What are your superhero powers? Go ahead and try them on this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!