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 Details

    • vSel

      private final EdgeOrientation vSel
      Selection of the first neighborhood of the target user.
    • wSel

      private final EdgeOrientation wSel
      Selection of the second neighborhood of the target user.
  • Constructor Details

  • Method Details

    • compute

      public double compute​(Graph<U> graph, U user)
      Description copied from interface: VertexMetric
      Computes the value of the metric for a single user.
      Specified by:
      compute in interface VertexMetric<U>
      Parameters:
      graph - The graph.
      user - The user to compute.
      Returns:
      the value of the metric.