<< NARVAL_M_ModeVANETRect NARVAL NARVAL_M_NeighborhoodN >>

NARVAL >> NARVAL > NARVAL_M_Neighborhood

NARVAL_M_Neighborhood

Perform the 1-hop neighborhood of a network node.

Calling Sequence

[N]=NARVAL_M_Neighborhood(i,head,tail)

Parameters

i :

node index.

head :

links head vector.

tail :

links tail vector.

N :

1-hop neighborhood of the node i.

Description

NARVAL_M_Neighborhood performs the 1-hop neighborhood of a network node. Extraction is made according to head and tail vectors.

Examples

n=80;//network size
L=1000;//network square area side
dmax=100;//locality radius
[g]=NARVAL_T_LocalityConnex(n,L,dmax);//generation of a random topology in respect with the Locality method. 
i=NARVAL_F_Random(length(g.node_x));//selection of the source node
ind=1;
f=NARVAL_G_ShowGraph(g,ind);
[N]=NARVAL_M_Neighborhood(i,g.head,g.tail);//application of NARVAL_M_Neighborhood
c=5;//visualization parameters 
b=10;
d=30;
i2=2;//window index
[gc,f2]=NARVAL_G_ShowNodes(g,N,c,b,d,i2);
N

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact

<< NARVAL_M_ModeVANETRect NARVAL NARVAL_M_NeighborhoodN >>