Class UniformDegreeWeight<V,​E>

  • All Implemented Interfaces:
    com.google.common.base.Function<VEPair<V,​E>,​java.lang.Double>, java.util.function.Function<VEPair<V,​E>,​java.lang.Double>

    public class UniformDegreeWeight<V,​E>
    extends java.lang.Object
    implements com.google.common.base.Function<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.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Hypergraph<V,​E> graph  
    • Method Summary

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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.google.common.base.Function

        equals
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Constructor Detail

      • UniformDegreeWeight

        public UniformDegreeWeight​(Hypergraph<V,​E> graph)
        Parameters:
        graph - the graph for which an instance is being created
    • Method Detail

      • apply

        public java.lang.Double apply​(VEPair<V,​E> ve_pair)
        Specified by:
        apply in interface com.google.common.base.Function<V,​E>
        Specified by:
        apply in interface java.util.function.Function<V,​E>