<< NL_G_SplitEdge NL_G: Graph NL_G_WCDS >>

NARVAL >> NL_G: Graph > NL_G_Star

NL_G_Star

Connect new nodes around a central node.

Calling Sequence

[Go] = NL_G_Star(N,D,G,I)

Arguments

N :

Quantity of neighbor nodes.

D :

Maximal radius from the central node.

G :

Initial network graph.

I :

Central node index.

:

Output graph.

Description

NL_G_Star connects N nodes around the central node of index I within the original graph G. They are randomly placed inside a disc of radius D centered around the node I. The distance between any new nodes and the central node belongs to the range .

In the previous picture, 4 new nodes have been attached to the node .

Examples

n=150;//original 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
gn=length(g.node_x);//real network size 
i=NL_F_RandInt1n(gn);//selection of the central node
N=10;//quantity of new nodes
d=100;//disc radius
[ge]=NL_G_Star(N,d,g,i);//application of NL_G_Star
ge.edge_color=[ones(1,length(g.head)) 5*ones(1,N)];//display the output graph
ge.edge_width=[2*ones(1,length(g.head)) 5*ones(1,N)];
ge.node_color=[ones(1,length(g.node_x)) 5*ones(1,N)];
ge.node_color(i)=2;
ge.node_border=[2*ones(1,length(g.node_x)) 5*ones(1,N)];
ge.node_border(i)=10;
ind=1;//window index
f=NL_G_ShowGraph(ge,ind);//graph visualization

Dependency

NL_G_MakeGraph, NL_G_GraphEdgesLength

Report an issue
<< NL_G_SplitEdge NL_G: Graph NL_G_WCDS >>