<< NARVAL_R_FloydWarshall NARVAL NARVAL_R_MPathDijkstra >>

NARVAL >> NARVAL > NARVAL_R_FloydWarshallP

NARVAL_R_FloydWarshallP

Extract the shortest path between two network nodes in respect with the Floyd-Warshall algorithm performance.

Calling Sequence

[p]=NARVAL_R_FloyWarshallP(Path,Next,i,j)

Parameters

Path :

matrix of path length between two network nodes.

Next :

matrix of successor nodes.

i :

source node.

j :

destination node.

p :

path.

Description

NARVAL_R_FloydWarshallP finds the shortest path between two nodes (i,j) of the graph g. Path(i,j) provides the total length of the shortest path between the nodes i and j. Next(i,j) provides an intermediate node that should be crossed in order to reach j from i in respect with the shortest path. They are generated by RoutingFloydWarshall.

Examples

[path]=NARVAL_F_NARVALPath();//path to NARVAL module
path=path+'/demos/';//folder path
load(path+'topo_100.graph');//loading of the network graph
load(path+'RoutingTables_topo_100.dat','pt','rt1','rt2','rt3','rt4','rt5');//loading of the network routing tables
[Path,Next]=NARVAL_R_FloydWarshall(g);//Application of the Floyd-Warshall algorithm
n=length(g.node_x);
[i,j]=NARVAL_F_Random_i_j(n);//generation of extremal connection nodes
[p]=NARVAL_R_FloydWarshallP(Path,Next,i,j);//Application of NARVAL_R_FloyWarshallP
p

Dependency

NARVAL_G_NodeNeighbors

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact

<< NARVAL_R_FloydWarshall NARVAL NARVAL_R_MPathDijkstra >>