Class Eccentricity<U>
java.lang.Object
es.uam.eps.ir.relison.sna.metrics.distance.vertex.Eccentricity<U>
- Type Parameters:
U- Type of the vertices.
- All Implemented Interfaces:
VertexMetric<U>
public class Eccentricity<U> extends java.lang.Object implements VertexMetric<U>
Metric that computes the eccentricity of the nodes.
Reference: P. Dankelmann, W. Goddard, C. Swart. The average eccentricity of a graph and its subgraphs. Utilitas Mathematica 65(May), pp. 41-51 (2004)
-
Field Summary
Fields Modifier and Type Field Description private DistanceCalculator<U>dcDistance calculator. -
Constructor Summary
Constructors Constructor Description Eccentricity()Constructor.Eccentricity(DistanceCalculator<U> dc)Constructor. -
Method Summary
Modifier and Type Method Description doubleaverageValue(Graph<U> graph)Computes the average value of the metric in the graph.java.util.Map<U,java.lang.Double>compute(Graph<U> graph)Computes the value of the metric for all the users in the graph.doublecompute(Graph<U> graph, U user)Computes the value of the metric for a single user.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, compute
-
Field Details
-
dc
Distance calculator.
-
-
Constructor Details
-
Eccentricity
public Eccentricity()Constructor. -
Eccentricity
Constructor.- Parameters:
dc- distance calculator.
-
-
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.
-
compute
Description copied from interface:VertexMetricComputes the value of the metric for all the users in the graph.- Specified by:
computein interfaceVertexMetric<U>- Parameters:
graph- The graph.- Returns:
- A map relating the users with the values of the metric.
-
averageValue
Description copied from interface:VertexMetricComputes the average value of the metric in the graph.- Specified by:
averageValuein interfaceVertexMetric<U>- Parameters:
graph- The graph.- Returns:
- the average value of the metric.
-