<< NARVAL_G_GraphConnex NARVAL NARVAL_G_GraphDegDist >>

NARVAL >> NARVAL > NARVAL_G_GraphConnexInd

NARVAL_G_GraphConnexInd

Extract the ith connex component a network graph.

Calling Sequence

[gc]=NARVAL_G_GraphConnexInd(g,nc,compo,ic)

Parameters

g :

network graph.

nc :

size vector of each connex component.

compo :

vector of nodes per connex component.

ic :

index of the selected connected set.

gc :

output network graph.

Description

NARVAL_G_GraphConnexInd extracts the connex component of index ind of the network graph g. As a matter of course a network must be connex as its nodes should be reachable from its structure.

Examples

n=50;//network size
L=1000;//network square area side
dmax=100;//locality radius
[g]=NARVAL_T_Locality(n,L,dmax);//generation of a random topology in respect with the Locality method.
ind=1;
f=NARVAL_G_ShowGraph(g,ind);
[nc,compo]=NARVAL_G_Connex(g);
inf=find(nc>1);
for j=1:length(inf)
[gc]=NARVAL_G_GraphConnexInd(g,nc,compo,inf(j));//application of NARVAL_G_GraphConnexInd
f=NARVAL_G_ShowGraph(gc,j+ind);
f.figure_name=gc.name + string(j);
end

Dependency

NARVAL_G_Connex, NARVAL_F_RVector, NARVAL_G_NodeNeighbors, NARVAL_G_MakeGraph, NARVAL_G_EdgeLength

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact

<< NARVAL_G_GraphConnex NARVAL NARVAL_G_GraphDegDist >>