edu.uci.ics.jung.algorithms.scoring
Class DegreeScorer<V>

java.lang.Object
  extended by 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.
 
Constructor Summary
DegreeScorer(Hypergraph<V,?> graph)
          Creates an instance for the specified graph.
 
Method Summary
 Integer getVertexScore(V v)
          Returns the degree of the vertex.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

graph

protected Hypergraph<V,?> graph
The graph for which scores are to be generated.

Constructor Detail

DegreeScorer

public DegreeScorer(Hypergraph<V,?> graph)
Creates an instance for the specified graph.

Parameters:
graph - the input graph
Method Detail

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.