Joined: Sun Apr 22, 2007 7:16 am Posts: 14 Location: Qalubia, shibeen el anater Has thanked: 0 time Have thanks: 0 time
Dijkstra program that get shortest path between two nodes in network
Attachments:
File comment: Program that get the shortest path between two nodes in network Dijkstra.rar [37.2 KiB]
Downloaded 2005 times
kino
Question subject: Re: Dijkstra ( Shortest Path )
Posted: Sat Apr 11, 2009 6:13 pm
Joined: Sat Apr 11, 2009 6:02 pm Posts: 2 Has thanked: 0 time Have thanks: 0 time
Hi, i need it.. how can I get it?
Janepenelope
Question subject: Re: Dijkstra ( Shortest Path )
Posted: Mon Apr 20, 2009 1:49 pm
Joined: Sat Apr 18, 2009 1:20 pm Posts: 20 Location: UK Has thanked: 0 time Have thanks: 0 time
Dijkstra's algorithm solves the single-source shortest-path problem when all edges have non-negative weights. It is a greedy algorithm and similar to Prim's algorithm. Algorithm starts at the source vertex, s, it grows a tree, T, that ultimately spans all vertices reachable from S. Vertices are added to T in order of distance i.e., first S, then the vertex closest to S, then the next closest, and so on. Following implementation assumes that graph G is represented by adjacency lists.
Joined: Sat Apr 11, 2009 6:02 pm Posts: 2 Has thanked: 0 time Have thanks: 0 time
Well.. I know what dijkstra's algorithm is.. but I need some c# code for the shortest path between routers in a LAN.. or something like that.. a program that sends packets to the net and can recognise the distance between two points, and sharing the data can get to the "x" router with the shortest path.. Could someone hep me? (sorry my very bad english I'm italian)