de.cesr.more.measures.network.supply.algos
Class MInDegreeScorer<V>

java.lang.Object
  extended by de.cesr.more.measures.network.supply.algos.MInDegreeScorer<V>
Type Parameters:
V - vertex type
All Implemented Interfaces:
VertexScorer<V,Integer>

public class MInDegreeScorer<V>
extends Object
implements VertexScorer<V,Integer>

MORe

Date:
13.01.2011

Field Summary
protected  Hypergraph<V,?> graph
          The graph for which scores are to be generated.
 
Constructor Summary
MInDegreeScorer(Hypergraph<V,?> graph)
          Creates an instance for the specified graph.
 
Method Summary
 Integer getVertexScore(V v)
          In case the graph is an instance of DirectedGraph it returns the in-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

MInDegreeScorer

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

Parameters:
graph - the input graph
Method Detail

getVertexScore

public Integer getVertexScore(V v)
In case the graph is an instance of DirectedGraph it returns the in-degree of the vertex. Otherwise it returns the degree.

Specified by:
getVertexScore in interface VertexScorer<V,Integer>
Returns:
the (out-)degree of the vertex