<< NL_R_TreePathN2N NL_R: Routing NL_S: Security >>

NARVAL >> NL_R: Routing > NL_R_TreePathN2R

NL_R_TreePathN2R

Perform the path between a node and the root of a tree.

Calling Sequence

[R] = NL_R_TreePathN2R(N,S,P)

Arguments

N :

Node.

S :

Root.

P :

Predecessor vector.

R :

Path.

Description

NL_R_TreePathN2R performs the path R between the node N and the root S of the tree defined by its predecessor vector P.

Examples

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

Report an issue
<< NL_R_TreePathN2N NL_R: Routing NL_S: Security >>