<< NL_R_CongestionMap NL_R: Routing NL_R_DFS >>

NARVAL >> NL_R: Routing > NL_R_CongestionSinkFlood

NL_R_CongestionSinkFlood

Perform the congestion map and predecessor vectors between a sink and the remaining nodes of a graph.

Calling Sequence

[C,D,P] = NL_R_CongestionSinkFlood(G,S)

Arguments

G :

Graph.

S :

Sink.

C :

Congestion map.

D :

Distance map.

P :

Predecessor vector.

Description

NL_R_CongestionSinkFlood performs the congestion map C and predecessor vectors P between the sink S and the remaining nodes of the graph G. The congestion map C gives the information about the number of shortest paths from all the graph nodes towards the sink that cross each node. The predecessor vector P provides the direction that each node needs to follow in order to reach the sink. The distance map D gives the distance between each node towards the sink.

Examples

n=100;//network size
L=1000;//network squared area side
r=150;//Locality radius
[g]=NL_T_LocalityConnex(n,L,r);//generation of a topology
w=1;//window index
f=NL_G_ShowGraphN(g,w);//graph visualization
n=g.node_number;//graph size
sink=NL_F_RandInt1n(n);//selection of the sink
[cm,np,pred]=NL_R_CongestionSinkFlood(g,sink)//application of NL_R_CongestionSinkFlood

Dependency

NL_F_RemoveFirstOcc, NL_R_DijkstraNiNj

Report an issue
<< NL_R_CongestionMap NL_R: Routing NL_R_DFS >>