Connect a Waxman subnetwork around a node.
[ge]=WCirclePlace(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.
new network graph.
WCirclePlace connects n nodes around a 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.
n=100;//network size L=1000;//network square area side dmax=100;//Locality radius [g]=NtgLocalityConnex(n,L,dmax);//generation of a topology in respect with the Locality method i=Random(length(g.node_x));//selection of the source node a=0.4; b=0.8; newN=20;//quantity of nodes of the new subnetwork newD=150;//maximal radius between new nodes and the central node [ge]=WCirclePlace(a,b,newN,newD,g,i);//application of WCirclePlace gl=length(g.head);//display 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; show_graph(ge); | ![]() | ![]() |