<< NL_R_DFSSearchEnd NL_R: Routing NL_R_DFSWeight >>

NARVAL >> NL_R: Routing > NL_R_DFSWSearchEnd

NL_R_DFSWSearchEnd

Update the vector of candidates where to propagate the topology discovery tree from a current node in respect with the node degree (End).

Calling Sequence

[V,C,P] = NL_R_DFSWSearchEnd(I,G,D,V,C,P)

Arguments

I :

Current node.

G :

Graph.

D :

Node degree distribution vector.

V :

Vector that gathers the chronological order how network nodes are visited.

C :

Vector of candidate nodes.

P :

Vector composed by the predecessor of each node in order to reach the source node.

Description

NL_R_DFSWSearchEnd updates the vector of candidates C where to propagate the topology discovery tree from the current node I in respect with the node degree. D is the node degree distribution vector. The network nodes already visited by the algorithm are stored in V. A tree inside the graph G is constructed in respect with a source node defined as the root. This graph search algorithm begins at the root node and explores all the neighboring nodes. Then for each of those nearest nodes, unexplored neighbor nodes are explored, and so on. The search is done in respect with a discovery propagation towards towards the most connected nodes. New candidates are added at the beginning of C.

Examples

n=100;//network size
l=1000;//network squared area side
d=100;//Locality radius
[g]=NL_T_LocalityConnex(n,l,d);//generation of a topology
nr=length(g.node_x);//real network size
nl=length(g.head);
i=NL_F_RandInt1n(length(g.node_x));//selection of the source node
pred=zeros(1,n);//initialization
v=[];//visited
c=[];//candidates
[d,dv]=NL_G_GraphDegreeDist(g);//calculation of the node degree distribution
[v,c,pred]=NL_R_DFSWSearchEnd(i,g,dv,v,c,pred);//application of NL_R_DFSWSearchEnd 
p=[];//display the candidates, the first ones are represented with the smallest edge width
for j=1:length(c)
p=[p NL_G_Nodes2Path([v c(j)],g)];
end
Bdi=5;
Ebi=2;
EC=ones(1,nl);//edge color
EB=Ebi*ones(1,nl);//edge width
EC(p)=5;
EB(p)=Ebi*(1:length(p));
D=Bdi*ones(1,nr);//node border
D([v c])=2*Bdi;
g.node_border=D;
g.edge_color=EC;
g.edge_width=EB;
ind=1;//window index
[f]=NL_G_ShowGraphN(g,ind);//graph visualization
i
v
c
pred

Dependency

NL_G_NodeNeighbors

Report an issue
<< NL_R_DFSSearchEnd NL_R: Routing NL_R_DFSWeight >>