Perform the 1-hop neighborhood of a network node (Head and Tail vectors).
[N] = NL_G_NodeNeighborsHT(I,H,T)
Node index.
Head vector.
Tail vector.
Neighborhood.
NL_G_NodeNeighborsHT 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]=NL_G_NodeNeighborsHT(i,g.head,g.tail)//application of NL_G_NodeNeighborsHT c=5;//visualization parameters: color b=10;//border d=30;//diameter ind=1;//window index [gc,f2]=NL_G_HighlightNodes(g,N,c,b,d,ind); | ![]() | ![]() |