Connect a Waxman subnetwork around a node of a graph.
[Go] = NL_T_AddWaxman2Node(A,B,N,D,G,I)
First parameter of the Waxman model.
Second parameter of the Waxman model.
Quantity of nodes of the new subnetwork.
Maximal radius between new nodes and the central node.
Initial network graph.
Central node index.
Output graph.
NL_T_AddWaxman2Node connects N nodes around the central node with index I inside the original graph G. They are randomly placed inside a disc centered in the node I with the radius D (D/2-->D). New links between these N nodes are created in respect with the Waxman algorithm.
In the previous picture, 4 new nodes have been attached to the node .
n=100;//network size L=1000;//network square area side dmax=100;//Locality radius [g]=NL_T_LocalityConnex(n,L,dmax);//generation of a topology in respect with the Locality method i=NL_F_RandInt1n(length(g.node_x));//selection of the source node a=0.4;//Waxman parameters b=0.8; newN=20;//quantity of nodes of the new subnetwork newD=150;//maximal radius between new nodes and the central node [ge]=NL_T_AddWaxman2Node(a,b,newN,newD,g,i);//application of NL_T_AddWaxman2Node gl=length(g.head);//visualization parameters gel=length(ge.head); gn=length(g.node_x); gen=length(ge.node_x); ec=5*ones(1,gel); ec(1:gl)=ones(1,gl); nc=5*ones(1,gen); nc(1:gn)=ones(1,gn); ge.edge_color=ec; ge.node_color=nc; ind=1;//window index f=NL_G_ShowGraph(ge,ind);//graph visualization | ![]() | ![]() |