<< NARVAL_F_DiffVectors NARVAL NARVAL_F_NARVALPath >>

NARVAL >> NARVAL > NARVAL_F_Distance

NARVAL_F_Distance

Perform the Euclidian distance between two network nodes of a graph.

Calling Sequence

[d] = NARVAL_F_Distance(n1,n2,nx,ny)

Parameters

n1 :

network node.

n2 :

network node.

nx :

x-coordinates of network nodes.

ny :

y-coordinates of network nodes.

Description

NARVAL_F_Distance calculates the Euclidian distance between two network nodes n1 and n2. The network nodes coordinates are assumed to be stored inside the vectors nx and ny.

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. 
N=length(g.node_x);//real network size
[n1,n2]=NARVAL_F_Random_i_j(N);//selection of two distinct nodes
ind=1;//window index
c=5;//node color
b=10;//node border
d=30;//node diameter
[go,f]=NARVAL_G_ShowNodes(g,[n1 n2],c,b,d,ind);//graph display
[d]=NARVAL_F_Distance(n1,n2,g.node_x,g.node_y);//application of NARVAL_F_Distance
n1
n2
d

Authors

Foued Melakessou

Contact

Dr. Foued Melakessou

Research Associate

Interdisciplinary Centre for Security, Reliability and Trust

Room F106

University of Luxembourg

6, rue Coudenhove Kalergi

L-1359 Luxembourg-Kirchberg

E-mail: foued.melakessou@uni.lu

Tel: (+352) 46 66 44 5346

Home Page


<< NARVAL_F_DiffVectors NARVAL NARVAL_F_NARVALPath >>