Place a hierarchical network layer.
[g,nl,ec,db,d,c,le,cv]=LayerPlacement(a,b,g,nd,nf,nl,L,n,j,ec,db,dd,d,c,le,cv)
first parameter of the Waxman model.
second parameter of the Waxman model.
network graph.
first node of the previous network layer.
last node of the previous network layer.
network squared area side per layer.
maximal quantity of nodes per subnetwork for each layer.
layer index.
color of each network edge.
original diameter of nodes.
diameter difference between successive network layers.
diameter of each network node.
color of each network node.
quantity of the current network links.
color of each network layer.
LayerPlacement connects subnetworks generated by the Waxman algorithm to the network g. It permits to create hierarchic networks.
nl(j) nodes belonging to the layer j are placed by joining subnetworks created by the Waxman algorithm limited in size by n(j). The location where subnetworks connect to the current topology is uniformly selected among the set of nodes of the previous layer.
a=0.3;//first parameter of the Waxman model of the first network layer b=0.5;//second parameter of the Waxman model of the first network layer ns=30;//network size L=1000;//network square area side [g,conn]=WaxmanConnex(a,b,ns,L);//generate a topology a1=0.3;//first parameter of the Waxman model of the second network layer b1=0.7;//second parameter of the Waxman model of the second network layer nl=[30 50 50 100];//quantity of nodes per layer l=[1000 150 100 40];//network squared area side per layer n=[5 10 3 3];//maximal quantity of nodes per subnetwork for each layer db=20;//original diameter of nodes dd=5;//diameter difference between successive layers cv=[2 5 6 1];//color of each network layer nd=1;//first node of the first layer. nf=length(g.node_x);//last node of the first layer. le=length(g.tail); ec=1*ones(1,le);//color of each network edge. d=db*ones(1,length(g.node_x));//diameter of each network node c=1*ones(1,length(g.node_x));//color of each network node j=2;//layer index [ge,nl,ec,db,d,c,le,cv]=LayerPlacement(a1,b1,g,nd,nf,nl,l,n,j,ec,db,dd,d,c,le,cv);//application of LayerPlacement ge.edge_color=ec; ge.node_diam=d; ge.node_color=c; show_graph(ge); | ![]() | ![]() |