<< NL_R_RTReduction NL_R: Routing NL_R_TreePathN2N >>

NARVAL >> NL_R: Routing > NL_R_TreeExtraction

NL_R_TreeExtraction

Extract a tree from a network topology.

Calling Sequence

[Go] = NL_R_TreeExtraction(G,R,P)

Arguments

G :

Graph.

R :

Root node.

P :

Predecessor vector.

:

Tree.

Description

NL_R_TreeExtraction performs the extraction of the tree defined by its predecessor vector P generated from the root R of the network topology G.

Examples

n=150;//network size
L=1000;//network square area side
dmax=150;//Locality radius
[g]=NL_T_LocalityConnex(n,L,dmax);//generation of a topology in respect with the Locality method
[r,nind]=NL_F_RandVectorNoRepl(1:length(g.node_x));//selection of the root node
dw=5;//display parameter
ind=1;//window index
[go,v,pred]=NL_R_BFSPlot(g,r,dw,ind);//performance of the tree
[gt]=NL_R_TreeExtraction(g,r,pred);//application of NL_R_TreeExtraction
iw=2;//window index
f=NL_G_ShowGraphN(gt,iw);//tree visualization

Dependency

NL_F_RemoveVecIndex, NL_G_MakeGraph

Report an issue
<< NL_R_RTReduction NL_R: Routing NL_R_TreePathN2N >>