<< NARVAL_G_LoadGraph NARVAL NARVAL_G_LongueurArc >>

NARVAL >> NARVAL > NARVAL_G_LocalClustering

NARVAL_G_LocalClustering

Perform the local clustering of the k-degree nodes of a graph.

Calling Sequence

[ik,LN,LC]=NARVAL_G_LocalClustering(g,k)

Parameters

g :

graph.

k :

node degree.

ik :

index of k-degree nodes.

LN :

vector with the number of links between neighbors of the k-degree nodes.

LC :

local clustering.

Description

NARVAL_G_LocalClustering performs the local clustering LC of the k degree nodes within the graph g. If mnn(k) is the average number of links between the neighbors of k-degree nodes, the local clustering LC is the ratio of this number to the maximum possible such links: LC(k)=2*mnn(k)/(k*(k-1)). If two neighbors of a node are connected, then these three nodes together form a triangle (3-cycle). Thus the local clustering corresponds to the average number of 3-cycles involving k-degree nodes.

Examples

n=300;//network size
l0=5;//a maximum of 5 links are created for any created node
L=1000;//network square area side 
[g,dd]=NARVAL_T_BarabasiAlbert(n,l0,L);//generation of the topology
ind=1;
[f]=NARVAL_G_ShowGraph(g,ind);
[d,dv]=NARVAL_G_GraphDegDistWD(g);//extraction of the node degree distribution
m=max(dv);
LCv=[];
for i=2:m
[ik,LN,LC]=NARVAL_G_LocalClustering(g,i);
LCv=[LCv LC];
end
LCv

Dependency

NARVAL_G_GraphDegDistWD, NARVAL_G_NodeNeighbors, NARVAL_G_InternLinks

Author

http://wwwen.uni.lu/interdisciplinary_centre_for_security_reliability_and_trust

Contact

<< NARVAL_G_LoadGraph NARVAL NARVAL_G_LongueurArc >>