Perform the 1-hop neighborhood of the shortest path between two network nodes in respect with a routing table.
[vs]=NARVAL_G_ConnectionNeigh(g,rt,nd,nf,n)
network graph.
routing table.
emission node.
destination node.
network size.
1-hop neighborhood.
NARVAL_G_ConnectionNeigh performs the 1-hop neighborhood vs of the shortest path between two nodes nd and nf inside the network graph g of size n. rt corresponds to the routing table used to calculate the shortest path between the connection extremal nodes.
[path]=NARVAL_F_NARVALPath();//path to NARVAL module path=path+'/demos/';//folder path load(path+'RoutingTables_topo_100.dat','pt','rt1','rt2','rt3','rt4','rt5');//loading of the network routing tables load(path+'topo_100.graph','g');//loading of the network graph n=100;//network size [nd,nf]=NARVAL_F_Random_i_j(n);//generation of connection extreme nodes [vs]=NARVAL_G_ConnectionNeigh(g,rt1,nd,nf,n);//application of NARVAL_G_ConnectionNeigh p=NARVAL_R_PathERT(rt1,nd,nf,n);//shortest path extraction between nd and nf i1=1;//window index [gr,f]=NARVAL_G_ShowNodes(g,vs,5,10,30,i1); [pl]=NARVAL_G_Nodes2Path(p,g);//display the neighborhood nl=length(gr.head); ec=ones(1,nl); ec(pl)=2; eb=ones(1,nl); eb(pl)=2; gr.edge_width=eb; gr.edge_color=ec; ind=1; NARVAL_G_ShowGraph(gr,2); | ![]() | ![]() |