Class ClusteringCoefficient<U>
java.lang.Object
es.uam.eps.ir.relison.sna.metrics.graph.ClusteringCoefficient<U>
- Type Parameters:
U- Type of the users.
- All Implemented Interfaces:
GraphMetric<U>
public class ClusteringCoefficient<U> extends java.lang.Object implements GraphMetric<U>
Computes the global clustering coefficient of a graph.
Reference: M.E.J. Newman. Networks: an introduction (2010)
-
Field Summary
Fields Modifier and Type Field Description private inttrianglesNumber of triangles in the graph.private inttripletsNumber of triplets in the graph.private EdgeOrientationvSelOrientation for selecting the neighbours of the studied node.private EdgeOrientationwSelOrientation for selecting the neighbours of the studied node. -
Constructor Summary
Constructors Constructor Description ClusteringCoefficient()Constructor.ClusteringCoefficient(EdgeOrientation vSel, EdgeOrientation wSel)Constructor. -
Method Summary
-
Field Details
-
Constructor Details
-
ClusteringCoefficient
public ClusteringCoefficient()Constructor. Applies the usual directed clustering coefficient of a graph. -
ClusteringCoefficient
Constructor. This constructor allows to specify the direction of the clustering coefficient metrics.- Parameters:
vSel- First selection of nodes.wSel- Second selection of nodes.
-
-
Method Details
-
compute
Description copied from interface:GraphMetricComputes the value.- Specified by:
computein interfaceGraphMetric<U>- Parameters:
graph- graph metric.- Returns:
- the value of the metric.
-