Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

C++ source that display connected graphs

Posted on 1998-07-03
4
Medium Priority
?
419 Views
Last Modified: 2012-08-13
I want to display a connected graph. The graph consists of nodes
that are connected to each other. Now I search for algorithms or
source code in C/C++ that help me show the graph in 2D with
the connections but without any connections crossing eachother
(if it is possible).

Where can I find this ?
0
Comment
Question by:d94stein
  • 2
4 Comments
 

Author Comment

by:d94stein
ID: 1167114
Adjusted points to 100
0
 

Expert Comment

by:pdroogma
ID: 1167115
I don't know what your background is, but it is best to read a mathematical book about graphs, if you're graphs are simple ( read less then 5-6 nodes ) then it is quit easy, but the problem is that you can't draw fully connected graphs with more than 5 nodes without paths that cross each other. To check if to paths are crossing you can use the fact that if two paths are crosing that there's an intersection point so go back to math and use the equation of lines. If you have a fully connected graph start switching nodes till you find a possible solution.
0
 

Author Comment

by:d94stein
ID: 1167116
The graph has about 5000 nodes, but I'm not planning to show them all
at the same time. Just a part of the graph (about 20-40 nodes) that I choose.
Every node is connected to 1-7 other nodes (most have just 1-3 paths).

I could try to create the code myself, but i want to avoid inventing the wheel
once again so if there are some code or examples out there somewhere I
would be happy to know about it.

0
 

Accepted Solution

by:
Adelmo earned 300 total points
ID: 1167117
If I understand correctly, you are looking for code that helps you visualize your big Graph(s)?
Here is what I propose: goto http://www.mpi-sb.mpg.de/LEDA/leda.html
LEDA stands for Library for efficient Datastructures and Algorithms. It has very powerful algorithms implemented to display, manipulate and traverse all kind of Graphs. It is free for academical purposes. It's available for MS and UNIX.

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question