Perform the force generated by the Hooke's attraction.
[Hx,Hy] = NARVAL_G_HookeForce(kh,i,j,nx,ny,l)
Hooke coefficient.
starting node.
ending node.
current x-coordinates vector of nodes.
current y-coordinates vector of nodes.
edge length at the equilibrium.
x-coordinate of the Hooke's attraction.
y-coordinate of the Hooke's attraction.
NARVAL_G_HookeForce performs the Hooke's attraction [Hx,Hy] between the two nodes i and j of a graph after their displacement. The position of all nodes is assumed to be stored in [nx,ny]. The edge length at the equilibrium is l. The Hooke's law of elasticity is an approximation that states that the extension of a spring is in direct proportion with the load applied to it (WIKIPEDIA).
n=3;//network size l0=5;//a maximum of 5 links are created for any created node L=1000;//network square area side kh=0.1;//Hooke's coefficient [g,d]=NARVAL_T_BarabasiAlbert(n,l0,L);//generation of the topology n=g.node_number;//real network size l=length(g.head);//number of links nx=g.node_x;//current position ny=g.node_y; li=NARVAL_F_AleaNombre(l);//selection of a link [nd,nf]=NARVAL_G_Edge2Nodes(g,li);//edge index le=50;//edge length at the equilibrium [Hx,Hy]=NARVAL_G_HookeForce(kh,nd,nf,nx,ny,le);//application of NARVAL_G_HookeForce Hx Hy | ![]() | ![]() |
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