Class UniformDegreeWeight<V,​E>

  • All Implemented Interfaces:
    org.apache.commons.collections4.Transformer<VEPair<V,​E>,​java.lang.Double>

    public class UniformDegreeWeight<V,​E>
    extends java.lang.Object
    implements org.apache.commons.collections4.Transformer<VEPair<V,​E>,​java.lang.Double>
    An edge weight function that assigns weights as uniform transition probabilities. For undirected edges, returns 1/degree(v) (where 'v' is the vertex in the VEPair. For directed edges, returns 1/outdegree(source(e)) (where 'e' is the edge in the VEPair). Throws an IllegalArgumentException if the input edge is neither EdgeType.UNDIRECTED nor EdgeType.DIRECTED.
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Double transform​(VEPair<V,​E> ve_pair)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UniformDegreeWeight

        public UniformDegreeWeight​(edu.uci.ics.jung.graph.Hypergraph<V,​E> graph)
        Creates an instance for the specified graph.
    • Method Detail

      • transform

        public java.lang.Double transform​(VEPair<V,​E> ve_pair)
        Specified by:
        transform in interface org.apache.commons.collections4.Transformer<V,​E>
        See Also:
        Transformer.transform(java.lang.Object)