<< NL_G_GraphConnexPart NL_G: Graph NL_G_GraphDegreeDist >>

NARVAL >> NL_G: Graph > NL_G_GraphConnexPartI

NL_G_GraphConnexPartI

Extract the connex component a graph.

Calling Sequence

[Go] = NL_G_GraphConnexPartI(G,N,C,I)

Arguments

G :

Graph.

N :

Size vector of each connex component.

C :

Vector of nodes per connex component.

I :

Index of the selected connected set.

:

Output network graph.

Description

NL_G_GraphConnexPartI extracts the connex component of index I of the graph G. C represents a vector composed by ordered nodes of each connex component and N gives their size. They can be performed with the function NL_G_Connex. In fact, the first connex component has a size of . Thus it is composed by nodes . Afterwards the second connex component has a size of . Thus it is composed by nodes , etc. Thus we have and with .

Examples

n=50;//network size
L=1000;//network square area side
dmax=100;//locality radius
[g]=NL_T_Locality(n,L,dmax);//generation of a random topology in respect with the Locality method.
ind=1;//window index
f=NL_G_ShowGraphN(g,ind);//graph visualization
[nc,compo]=NL_G_ConnexComponent(g);//extraction of connex parameters 
inf=find(nc>2);//selection of component composed by more than 2 nodes
for j=1:length(inf)
[gc]=NL_G_GraphConnexPartI(g,nc,compo,inf(j));//application of NL_G_GraphConnexPartI
f=NL_G_ShowGraphN(gc,j+ind);//graph visualization
f.figure_name=gc.name + string(j);
end

Dependency

NL_F_ReverseVector, NL_G_NodeNeighbors, NL_G_MakeGraph, NL_G_GraphEdgesLength

Report an issue
<< NL_G_GraphConnexPart NL_G: Graph NL_G_GraphDegreeDist >>