Extract a tree from a network topology.
[Go] = NL_R_TreeExtraction(G,R,P)
Graph.
Root node.
Predecessor vector.
Tree.
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.
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 | ![]() | ![]() |