View Full Version : C++ code

therealjag

14th March 2006, 09:45

hey there i have this implementation of Dijkstra's algorithm from a friend and i was wondering if it is possible to convert this or implement this using Qt so that i can use it as part of my current application?? i have attached the files...

Michiel

14th March 2006, 10:03

You can use any C++ code with QT. You can use your data-structures and algorithm as they are. All you probably want is a way to input the adjacency list and a way to output the result. You can do that with QT. For the input you could use a QTable, for example. If you want to show the images, you can do that with QLabel. Large textual results could go in a QTextBrowser.

fullmetalcoder

14th March 2006, 14:35

hey there i have this implementation of Dijkstra's algorithm from a friend and i was wondering if it is possible to convert this or implement this using Qt so that i can use it as part of my current application?? i have attached the files...

What does that algorithm do? Never heard of it :confused:

jacek

14th March 2006, 15:09

What does that algorithm do? Never heard of it

It's one of the most famous algorithms. Every programmer should know it.

http://en.wikipedia.org/wiki/Dijkstra's_algorithm

therealjag

14th March 2006, 15:40

is there a way to use this code with QtPainter??

Michiel

14th March 2006, 16:15

I don't think that class is what you need.

Anyway, could you explain your problem more clearly?

GreyGeek

14th March 2006, 16:29

It's one of the most famous algorithms. Every programmer should know it.

http://en.wikipedia.org/wiki/Dijkstra's_algorithm

I heard about it but didn't know what it was.

To me, it looks like a Linear Algebra max-min problem that can be solved by using maxtrix transformations.

therealjag

14th March 2006, 19:06

I don't think that class is what you need.

Anyway, could you explain your problem more clearly?

i am bascailly trying to implement Dijkstra's shortest path algorithm using Qt. I know i will need a graph which is why i was thinking of using QPainter to do it. but im not sure how to go about it doing it that way because i have been trying for the past month. is using matrix transformations the best way to do it? i dont even know what they are?!

Michiel

14th March 2006, 19:48

Oooh. You want to show the shortest path dynamically on a graph! I can't help you with that. But now that your problem is clearly defined, maybe someone else can. :)

Powered by vBulletin® Version 4.2.5 Copyright © 2021 vBulletin Solutions Inc. All rights reserved.