Class DegreeScorer<V>

  • Type Parameters:
    V - the vertex type
    All Implemented Interfaces:
    VertexScorer<V,​java.lang.Integer>

    public class DegreeScorer<V>
    extends java.lang.Object
    implements VertexScorer<V,​java.lang.Integer>
    Assigns a score to each vertex equal to its degree.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected edu.uci.ics.jung.graph.Hypergraph<V,​?> graph
      The graph for which scores are to be generated.
    • Constructor Summary

      Constructors 
      Constructor Description
      DegreeScorer​(edu.uci.ics.jung.graph.Hypergraph<V,​?> graph)
      Creates an instance for the specified graph.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.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 edu.uci.ics.jung.graph.Hypergraph<V,​?> graph
        The graph for which scores are to be generated.
    • Constructor Detail

      • DegreeScorer

        public DegreeScorer​(edu.uci.ics.jung.graph.Hypergraph<V,​?> graph)
        Creates an instance for the specified graph.
        Parameters:
        graph - the input graph
    • Method Detail

      • getVertexScore

        public java.lang.Integer getVertexScore​(V v)
        Returns the degree of the vertex.
        Specified by:
        getVertexScore in interface VertexScorer<V,​java.lang.Integer>
        Returns:
        the degree of the vertex