summaryrefslogtreecommitdiff
path: root/src/Chapter4/util/InDegreeScorer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/Chapter4/util/InDegreeScorer.java')
-rw-r--r--src/Chapter4/util/InDegreeScorer.java30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/Chapter4/util/InDegreeScorer.java b/src/Chapter4/util/InDegreeScorer.java
deleted file mode 100644
index 014adc6..0000000
--- a/src/Chapter4/util/InDegreeScorer.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package Chapter4.util;
-
-import edu.uci.ics.jung.algorithms.scoring.VertexScorer;
-import edu.uci.ics.jung.graph.Hypergraph;
-
-/**
- * This is a Jung Node Scorer that computes the
- * In-Degree Centrality of nodes.
- */
-public class InDegreeScorer<T> implements VertexScorer<T, Double>{
-
- //The graph representation in JUNG.
- private Hypergraph<T, ?> graph;
-
- /**
- * Initialize the graph scorer.
- * @param graph
- * The graph we wish to score.
- */
- public InDegreeScorer(Hypergraph<T, ?> graph){
- this.graph = graph;
- }
-
- /**
- * @return The In-Degree Centrality of the vertex.
- */
- public Double getVertexScore(T node) {
- return (double) graph.getInEdges(node).size();
- }
-} \ No newline at end of file