Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ns2 simulation code for shortest path routing
#1

ns2 simulation code for shortest path routing

When to use Shortest Path routing?
An algorithm that is designed essentially to find a path of minimum length between two specified vertices of a connected weighted graph
Architecture-of-Shortest-Path-Routing
General procedure to find out shortest path:
Initialize the array smallestWeight so that smallestWeight[u] = weights[vertex, u].
Set smallestWeight[vertex] = 0.
Find the vertex, v, that is closest to vertex for which the shortest path has not been determined.
Mark v as the (next) vertex for which the smallest weight is found.
For each vertex w in G, such that the shortest path from vertex to w has not been determined and an edge (v, w) exists, if the weight of the path to w via v is smaller than its current weight, update the weight of w to the weight of v + the weight of the edge (v, w).
Reply

#2
gg[undefined=undefined][undefined=undefined][undefined=undefined]gg[/undefined][/undefined][/undefined]
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2024 iAndrew & Melroy van den Berg.