<< NL_G_WCDSNucleusChannel NL_G: Graph NL_I: Internet >>

NARVAL >> NL_G: Graph > NL_G_WeightOfPath

NL_G_WeightOfPath

Compute the total weight of a path.

Calling Sequence

[W] = NL_G_WeightOfPath(G,P)

Arguments

G :

Graph.

P :

Path.

W :

Weight.

Description

NL_G_WeightOfPath performs the total weight W of the path P inside the graph G.

Examples

n=100;//network size
l=1000;//network squared area side
d=100;//Locality radius
[g]=NL_T_LocalityConnex(n,l,d);//generation of a topology
w=1;//window index
f=NL_G_ShowGraphN(g,w);//graph visualization
[i,j]=NL_F_RandIntNiNj(g.node_number);//selection of the extremal nodes
[p]=NL_R_DijkstraNiNj(g,i,j)//path performance
[pl]=NL_G_WeightOfPath(g,p)//application of NL_G_WeightOfPath

Dependency

NL_G_Nodes2Path

Report an issue
<< NL_G_WCDSNucleusChannel NL_G: Graph NL_I: Internet >>