Perform the 1-hop neighborhood of a network node (extended outputs).
[N,Nh,Nt] = NL_G_NodeNeighborsHTN(I,H,T)
Node index.
Links' head vector.
Links' tail vector.
Neighborhood.
Neighborhood (head vector).
Neighborhood (tail vector).
NL_G_NodeNeighborsHTN performs the 1-hop neighborhood N of the network node I. The extraction is made according to the head H and tail T vectors.
The neighborhood of is
.
n=80;//network size L=1000;//network square area side dmax=100;//locality radius [g]=NL_T_LocalityConnex(n,L,dmax);//generation of a random topology in respect with the Locality method. i=NL_F_RandInt1n(length(g.node_x));//selection of the source node [N,Nh,Nt]=NL_G_NodeNeighborsHTN(i,g.head,g.tail)//application of NL_G_NodeNeighborsHTN ind=1;//window index c=5;//visualization parameters: colors b=10;//border d=30;//diameter [gc,f2]=NL_G_HighlightNodes(g,N,c,b,d,ind); | ![]() | ![]() |