Perform the 1-hop neighborhood of a network node.
[N]=MobilityNeighborhood(i,head,tail)
node index.
links head vector.
links tail vector.
1-hop neighborhood of the node i.
MobilityNeighborhood performs the 1-hop neighborhood of a network node. Extraction is made according to head and tail vectors.
n=80;//network size L=1000;//network square area side dmax=100;//locality radius [g]=NtgLocalityConnex(n,L,dmax);//generation of a random topology in respect with the Locality method. i=Random(length(g.node_x));//selection of the source node show_graph(g); [N]=MobilityNeighborhood(i,g.head,g.tail);//application of MobilityNeighborhood hilite_nodes(N); N | ![]() | ![]() |