<< NARVAL_R_ERoutingTable NARVAL NARVAL_R_FloodInit >>

NARVAL >> NARVAL > NARVAL_R_Flood

NARVAL_R_Flood

Perform the shortest path between two network nodes in respect with the Flood algorithm.

Calling Sequence

[path]=NARVAL_R_Flood(g,ne,nr,TTL)

Parameters

g :

network graph.

ne :

source node.

nr :

target node.

TTL :

Flood Time-To-Live.

path :

shortest path between ne and nr.

Description

NARVAL_R_Flood calculates the shortest path between a source node ne and a target node nr of the graph g.

Examples

n=80;//network size
L=1000;//network square area side
dmax=100;//locality radius
[g]=NARVAL_T_LocalityConnex(n,L,dmax);//generation of a random topology in respect with the Locality method.
ind=1;
f1=NARVAL_G_ShowGraph(g,ind);
N=length(g.node_x);//real network size
nl=length(g.head);//quantity of network links
[ne,nr]=NARVAL_F_Random_i_j(N);//selection of two distinct nodes
TTL=10;//Time-To-Live update
[path]=NARVAL_R_Flood(g,ne,nr,TTL);//application of NARVAL_R_Flood
p=NARVAL_G_Nodes2Path(path,g);
EC=ones(1,nl);//display the path between i and j
EB=2*ones(1,nl);
EC(p)=5;
EB(p)=5;
D=5*ones(1,N);
D(path)=10;
g.node_border=D;
g.edge_color=EC;
g.edge_width=EB;
ind2=2;
f2=NARVAL_G_ShowGraph(g,ind2);
ne
nr
path

Dependency

NARVAL_R_FloodInit, NARVAL_R_FloodIteration

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact

<< NARVAL_R_ERoutingTable NARVAL NARVAL_R_FloodInit >>