<< NARVAL_G_ForceBasedA NARVAL NARVAL_G_GraphConnexInd >>

NARVAL >> NARVAL > NARVAL_G_GraphConnex

NARVAL_G_GraphConnex

Extract the largest connex component of a network graph.

Calling Sequence

[g]=NARVAL_G_GraphConnex(g)

Parameters

g :

network graph.

Description

NARVAL_G_GraphConnex extracts the largest connex component 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.
[g1]=NARVAL_G_GraphConnex(g);//application of NARVAL_G_GraphConnex
i1=1;
i2=2;
NARVAL_G_ShowGraph(g,i1);
NARVAL_G_ShowGraph(g1,i2);
g1

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_ForceBasedA NARVAL NARVAL_G_GraphConnexInd >>