2 * Created on Jul 12, 2007
4 * Copyright (c) 2007, the JUNG Project and the Regents of the University
8 * This software is open-source under the BSD license; see either
10 * http://jung.sourceforge.net/license.txt for a description.
12 package edu.uci.ics.jung.algorithms.scoring;
14 import org.apache.commons.collections15.Transformer;
16 import edu.uci.ics.jung.algorithms.shortestpath.Distance;
17 import edu.uci.ics.jung.graph.Hypergraph;
20 * Assigns scores to each vertex based on the mean distance to each other vertex.
22 * @author Joshua O'Madadhain
24 public class ClosenessCentrality<V,E> extends DistanceCentralityScorer<V,E>
28 * Creates an instance using the specified vertex/vertex distance metric.
29 * @param graph the input
30 * @param distance the vertex/vertex distance metric.
32 public ClosenessCentrality(Hypergraph<V,E> graph, Distance<V> distance)
34 super(graph, distance, true);
38 * Creates an instance which measures distance using the specified edge weights.
39 * @param graph the input graph
40 * @param edge_weights the edge weights to be used to determine vertex/vertex distances
42 public ClosenessCentrality(Hypergraph<V,E> graph, Transformer<E, ? extends Number> edge_weights)
44 super(graph, edge_weights, true);
48 * Creates an instance which measures distance on the graph without edge weights.
51 public ClosenessCentrality(Hypergraph<V,E> graph)