Perform the path between a node and the root of a tree.
[R] = NL_R_TreePathN2R(N,S,P)
Node.
Root.
Predecessor vector.
Path.
NL_R_TreePathN2R performs the path R between the node N and the root S of the tree defined by its predecessor vector P.
n=150;//network size L=1000;//network square area side dmax=100;//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 [ni,nind]=NL_F_RandVectorNoRepl(nind);//selection of source [go,v,pred]=NL_R_BFSPlot(g,r,dw,ind);//performance of the tree [path]=NL_R_TreePathN2R(ni,r,pred)//application of NL_R_TreePathN2R | ![]() | ![]() |