<< NL_G_Diameter NL_G: Graph NL_G_Eccentricity >>

NARVAL >> NL_G: Graph > NL_G_DistancePartition

NL_G_DistancePartition

Perform the distance distribution of a graph.

Calling Sequence

[D] = NL_G_DistancePartition(R)

Arguments

R :

Enhanced routing table.

D :

Distance distribution.

Description

NL_G_DistancePartition performs the distance distribution D of the graph G in respect with its enhanced routing table R. R stores all paths between any couple of distinct nodes within the network. R can be generated with the application of NL_R_RT2ERT on the routing tables created from NL_R_FloodRT, NL_R_DijkstraRT, or NL_R_BellmanFordRT. For a better convenience, we already generated a scenario whith the creation of a graph composed by 100 nodes. We have also performed 5 enhanced routing tables providing multiple paths for each connection between two nodes. The route between the nodes and can be extracted at the line of index where represents the network size. Then for each path stored into a single line, its hop length can be found in the first column, followed by its length and finally the path composed by a list of nodes ([hop length | length | path]). D provides the probability for a random pair of nodes to be at a distance x hops from each other.

Examples

[path]=NL_F_NLPath();//path to NARVAL module
path=path+'/demos/';//folder path
load(path+'RoutingTables_topo_100.dat','pt','rt1','rt2','rt3','rt4','rt5');//loading of the network routing tables
[D]=NL_G_DistancePartition(rt1);//application of NL_G_DistanceDistribution
plo=1;//window index
scf(plo);//graph visualization
clf(plo);
f=gcf();
f.figure_name="NL_G_DistancePartition";
plot2d3(1:length(D),D,rect=[0 0 length(D) 1]);
plot2d(1:length(D),D,rect=[0 0 length(D) 1],style=5);
xtitle('Distance Distribution','Distance','Frequency');

Report an issue
<< NL_G_Diameter NL_G: Graph NL_G_Eccentricity >>