LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-09-2004, 02:44 PM   #1
jacksmash
Member
 
Registered: Nov 2003
Location: Ontario, Canada
Distribution: Ubuntu
Posts: 269

Rep: Reputation: 30
Graph Layout Algorithms


Hi, I'm trying to research Graph Layout to find some algorithms. I basically have to assign geometric data to some lines and nodes as part of an electrical system.
I'm not necessarily looking for code, but perhaps pseudo code or algorithms which would help me generate a graph which could be analyzed.

I've done several searches on the web, but I just get programs which implement these algorithms but do not necesarily show or teach you how.

Does anyone have any suggestions for me?

Thanks!
 
Old 02-09-2004, 03:19 PM   #2
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
Are you hoping to actually generate graphics on the screen, or just analyze the geometric data? And what kind of algorithms are you looking for, exactly? (there are many different kinds of algorithms)
 
Old 02-09-2004, 03:46 PM   #3
jacksmash
Member
 
Registered: Nov 2003
Location: Ontario, Canada
Distribution: Ubuntu
Posts: 269

Original Poster
Rep: Reputation: 30
Actually I will need to generate the geometric data myself, as well as display some layout on a screen. I'm thinking some type of hierarchichal layout will do.

Thanks for the question.
 
Old 02-09-2004, 04:05 PM   #4
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
Well, there are a lot of different ways you can display graphics. You can use an existing library or use OpenGL or whatever; without knowing what language you want to work in, I don't know what to suggest for what. Look around and I'm sure you'll find something.

What else do you need to do, though, aside from showing graphics on the screen?
 
Old 02-09-2004, 04:13 PM   #5
jacksmash
Member
 
Registered: Nov 2003
Location: Ontario, Canada
Distribution: Ubuntu
Posts: 269

Original Poster
Rep: Reputation: 30
The actual graphical part is what I am least worried about. I need to learn how to generate a Graph (of Vertices and Edges) and display it for analysis.

Displaying it will be easy... generating it is difficult.

The situation is this:

I have a list of vertices and edges, and I know which edges belong to which vertices, but they have no geometrical data.

This is called "Graph Layout" or "Graph Drawing". I've done many searches and found many programs which implement algorithms I'm looking for, but I cannot find the actual algorithms themselves!

Thanks for any help.
 
Old 02-09-2004, 04:56 PM   #6
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
Ah, I see what you're asking. A little searching turned up this package which is very expensive, but the link for "Smart diagramming" opens up a nifty little applet that shows some of what it can do - it might give you some ideas about what kind of layout you need to do. Depending on the structure of your graphs, you might need different algorithms, although I suppose a really simple algorithm would just layout the nodes in a rectangular grid and then connect them with straight lines. Wouldn't be pretty, but it's probably the easiest. A more complex algorithm would have to take into account which edges cross one another, and rearrange some nodes in order to minimize edge crossings and stuff like that. If your graphs are relatively simple, maybe some simple heuristics would help clean things up - like arranging the grid depending on which nodes have the most edges connected to them. The node with the most edges could be in the center, with the rest of the nodes arranged farther from the center if they have fewer edges.

Though, the best solution I can come up with is to make the graphical display interactive - let your program throw all the nodes up there, and then include some functionality so the user can drag nodes around and rearrange them to clean up the mess.
 
Old 02-10-2004, 05:56 AM   #7
synna
Member
 
Registered: Jan 2004
Posts: 40

Rep: Reputation: 15
You may want to look at Graphviz : http://www.research.att.com/sw/tools.../download.html it is an open source project about graph view, it is very powerfull. With a simple langage that you can generate, you can have a descriptive return about how to display (also an image if you prefer). Many program use it (like doxygen for collaboration diagram) to generate a graph view.

But as it's open source you can also check for algorithm and so on.

Hope this help
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
switching Linux kernel I/O scheduling algorithms irfanhab Slackware 1 03-17-2005 11:53 AM
Genetic Algorithms Research Paper firefly2442 Programming 1 12-17-2004 09:01 PM
Image resizing algorithms R00ts Programming 1 07-05-2004 12:56 PM
LRU and aging algorithms testing maniac01 Programming 0 04-25-2004 12:03 PM
Cultured Perl: Genetic algorithms, the next generation Debra Linux - Newbie 3 10-08-2002 05:14 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration