<< 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.

Calling Sequence

[p] = NARVAL_R_FloyWarshallP(Pa,Ne,i,j)

Parameters

Pa :

matrix of path length between two network nodes.

Ne :

matrix of successor nodes.

i :

source node.

j :

destination node.

p :

path.

Description

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

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
i
j
p

Dependency

NARVAL_G_NodeNeighbors

Authors

Foued Melakessou

Contact

Dr. Foued Melakessou

Research Associate

Interdisciplinary Centre for Security, Reliability and Trust

Room F106

University of Luxembourg

6, rue Coudenhove Kalergi

L-1359 Luxembourg-Kirchberg

E-mail: foued.melakessou@uni.lu

Tel: (+352) 46 66 44 5346

Home Page


<< NARVAL_R_FloydWarshall NARVAL NARVAL_R_MPathDijkstra >>