Class Distance2Degree<U>
java.lang.Object
es.uam.eps.ir.relison.sna.metrics.vertex.Distance2Degree<U>
- Type Parameters:
U- Type of the users.
- All Implemented Interfaces:
VertexMetric<U>
public class Distance2Degree<U> extends java.lang.Object implements VertexMetric<U>
Metric that finds the number of different neighbors at distance 2 from a user.
-
Field Summary
Fields Modifier and Type Field Description private EdgeOrientationfirstThe orientation for selecting the neighborhood of the user.private EdgeOrientationsecondThe orientation for selecting the neighborhood of the user's neighbors. -
Constructor Summary
Constructors Constructor Description Distance2Degree(EdgeOrientation first, EdgeOrientation second)Constructor. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface es.uam.eps.ir.relison.sna.metrics.VertexMetric
averageValue, averageValue, compute, compute
-
Field Details
-
Constructor Details
-
Distance2Degree
Constructor.- Parameters:
first- the orientation for selecting the neighborhood of the user.second- the orientation for selecting the neighborhood of the user's neighbors.
-
-
Method Details
-
compute
Description copied from interface:VertexMetricComputes the value of the metric for a single user.- Specified by:
computein interfaceVertexMetric<U>- Parameters:
graph- The graph.user- The user to compute.- Returns:
- the value of the metric.
-