<< NL_G_ConnectionNeighbors NL_G: Graph NL_G_Coreness >>

NARVAL >> NL_G: Graph > NL_G_ConnexComponent

NL_G_ConnexComponent

Extract the set of disjoint connex components of a graph.

Calling Sequence

[N,C] = NL_G_ConnexComponent(G)

Arguments

G :

Graph.

N :

Vector (connex component's size).

C :

Vector (nodes per connex component).

Description

NL_G_ConnexComponent extracts the set of all disjoint connex components () of the graph G. In fact, the first connex component has a size of . Thus it is composed by the nodes . Afterwards the second connex component has a size of . Thus it is composed by the 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,c]=NL_G_ConnexComponent(g)//application of NL_G_ConnexComponent

Dependency

NL_G_GraphDegreeDist, NL_F_RemoveFirstOcc, NL_R_BFS

Report an issue
<< NL_G_ConnectionNeighbors NL_G: Graph NL_G_Coreness >>