<< NL_G_HighlightEdges NL_G: Graph NL_G_HighlightNetwork >>

NARVAL >> NL_G: Graph > NL_G_HighlightFldLeaves

NL_G_HighlightFldLeaves

Highlight the leaves of a virtual tree (Flood).

Calling Sequence

[Go] = NL_G_HighlightFldLeaves(G,S,C,P,Sc,Sb,Sd,Ac,Ab,Ad,Lc,Lb,Ld,Ec,Ew)

Arguments

G :

Graph.

S :

Sink.

C :

Congestion map.

P :

Predecessor vector.

:

Sink color.

:

Sink border.

:

Sink diameter.

:

Aggregator color.

:

Aggregator border.

:

Aggregator diameter.

:

Leaf color.

:

Leaf border.

:

Leaf diameter.

:

Tree edge color.

:

Tree edge width.

:

Output graph.

Description

NL_G_HighlightFldLeaves highlights the leaves of a virtual tree (Flood) extracted from the graph G. The congestion map C gives information about the number of shortest paths from all the graph nodes towards the sink that cross each node. The predecessor vector P gives the direction that each node needs to follow in order to reach the sink. The visualization highlights tree components, e.g. the sinks (color: , border: , diameter: ), the aggregators (color: , border: , diameter: ) and the leaves (color: , border: , diameter: ). The edges of the tree are also displayed with the color and the width . The output graph is stored in .

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_ShowGraph(g,w);//graph visualization
n=g.node_number;//real network size
sink=NL_F_RandInt1n(n);//selection of the sink
[cm,np,pred]=NL_R_CongestionSinkFlood(g,sink);//flooding from the sink
ind=w+1;//window index
sc=2;//visualization parameters
sb=10;
sd=40;
ac=1;
ab=3;
ad=30;
lc=5;
lb=10;
ld=20;
ec=2;
ew=3;
[gl]=NL_G_HighlightFldLeaves(g,sink,cm,pred,sc,sb,sd,ac,ab,ad,lc,lb,ld,ec,ew);//application of NL_G_HighlightFldLeaves
ft=NL_G_ShowGraph(gl,ind);//graph visualization

Dependency

NL_F_RemoveFirstOcc, NL_G_Nodes2Path

Report an issue
<< NL_G_HighlightEdges NL_G: Graph NL_G_HighlightNetwork >>