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>
Assigns a score to each vertex equal to its degree.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Hypergraph
<V, ?> The graph for which scores are to be generated. -
Constructor Summary
ConstructorsConstructorDescriptionDegreeScorer
(Hypergraph<V, ?> graph) Creates an instance for the specified graph. -
Method Summary
-
Field Details
-
graph
The graph for which scores are to be generated.
-
-
Constructor Details
-
DegreeScorer
Creates an instance for the specified graph.- Parameters:
graph
- the input graph
-
-
Method Details
-
getVertexScore
Returns the degree of the vertex.- Specified by:
getVertexScore
in interfaceVertexScorer<V,
Integer> - Parameters:
v
- the vertex whose score is requested- Returns:
- the degree of the vertex
-