edu.uci.ics.jung.algorithms.scoring
Class DegreeScorer<V>
java.lang.Object
edu.uci.ics.jung.algorithms.scoring.DegreeScorer<V>
- Type Parameters:
V
- the vertex type
- All Implemented Interfaces:
- VertexScorer<V,Integer>
public class DegreeScorer<V>
- extends Object
- implements VertexScorer<V,Integer>
Assigns a score to each vertex equal to its degree.
Field Summary |
protected Hypergraph<V,?> |
graph
The graph for which scores are to be generated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
graph
protected Hypergraph<V,?> graph
- The graph for which scores are to be generated.
DegreeScorer
public DegreeScorer(Hypergraph<V,?> graph)
- Creates an instance for the specified graph.
- Parameters:
graph
- the input graph
getVertexScore
public Integer getVertexScore(V v)
- Returns the degree of the vertex.
- Specified by:
getVertexScore
in interface VertexScorer<V,Integer>
- Returns:
- the degree of the vertex
Copyright © 2009. All Rights Reserved.