<< NL_G_WCDSChannel NL_G: Graph NL_G_WCDSNucleus >>

NARVAL >> NL_G: Graph > NL_G_WCDSColor

NL_G_WCDSColor

Color a WCDS graph (4 colors).

Calling Sequence

[Go] = NL_G_WCDSColor(G,N,C)

Arguments

G :

Graph.

N :

List of master nodes (nucleus).

C :

List of channels (nucleus).

:

Output graph.

Description

NL_G_WCDSColor colors the WCDS graph G in order to reduce interferences (WIKIPEDIA). A color is assigned to each master node, so that 2 neighbor nodes will have a different channel. N represents the list of WCDS master nodes. The list of colors attributed by the 4-color theorem to each master node is stored in C (WIKIPEDIA). The output graph is stored in .

Examples

n=200;//network size
l=1000;//network squared area side
d=100;//Locality radius
[g]=NL_T_LocalityConnex(n,l,d);//generation of a topology
[go,n,e]=NL_G_WCDS(g);//calculation of the WCDS of g
w=1;//window index
f=NL_G_ShowGraphN(go,w);//graph visualization
[gnu]=NL_G_WCDSNucleus(g,n);//extraction of the graph between master nodes (nucleus)
Col=[2 5 6 7];//colors
[gnu_c]=NL_G_WCDSNucleusChannel(gnu,n,Col);//selection of each nucleus node color
[g_col]=NL_G_WCDSColor(g,n,gnu_c.node_color);//application of NL_G_WCDSColor
w2=2;//window index
[f2]=NL_G_ShowGraphN(gnu_c,w2);//graph visualization
w3=3;//window index
[f3]=NL_G_ShowGraphN(g_col,w3);//graph visualization

Dependency

NL_G_NodeNeighbors, NL_G_Nodes2Path

Report an issue
<< NL_G_WCDSChannel NL_G: Graph NL_G_WCDSNucleus >>