Class LocalClusteringCoefficient<U>
java.lang.Object
es.uam.eps.ir.relison.sna.metrics.vertex.LocalClusteringCoefficient<U>
- Type Parameters:
U
- type of the users.
- All Implemented Interfaces:
VertexMetric<U>
public class LocalClusteringCoefficient<U> extends java.lang.Object implements VertexMetric<U>
Computes the local clustering coefficient of a node.
Reference: D.J. Watts, S.H. Strogatz. Collective dynamics of 'small-world' networks. Nature 393(6684), pp. 440-442 (1998)
-
Field Summary
Fields Modifier and Type Field Description private EdgeOrientation
vSel
Selection of the first neighborhood of the target user.private EdgeOrientation
wSel
Selection of the second neighborhood of the target user. -
Constructor Summary
Constructors Constructor Description LocalClusteringCoefficient()
Default constructor.LocalClusteringCoefficient(EdgeOrientation vSel, EdgeOrientation wSel)
Constructor. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface es.uam.eps.ir.relison.sna.metrics.VertexMetric
averageValue, averageValue, compute, compute
-
Field Details
-
Constructor Details
-
LocalClusteringCoefficient
Constructor.- Parameters:
vSel
- Selection of the first neighborhood of the target user.wSel
- Selection of the second neighborhood of the target user.
-
LocalClusteringCoefficient
public LocalClusteringCoefficient()Default constructor. Relates the incoming neighbourhood and the outgoing one.
-
-
Method Details
-
compute
Description copied from interface:VertexMetric
Computes the value of the metric for a single user.- Specified by:
compute
in interfaceVertexMetric<U>
- Parameters:
graph
- The graph.user
- The user to compute.- Returns:
- the value of the metric.
-