Class UniformInOut<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 UniformInOut<V,​E>
    extends java.lang.Object
    implements com.google.common.base.Function<VEPair<V,​E>,​java.lang.Double>
    Assigns weights to directed edges (the edge of the vertex/edge pair) depending on whether the vertex is the edge's source or its destination. If the vertex v is the edge's source, assigns 1/outdegree(v). Otherwise, assigns 1/indegree(w). Throws IllegalArgumentException if the edge is not directed.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Graph<V,​E> graph
      The graph for which the edge weights are defined.
    • Constructor Summary

      Constructors 
      Constructor Description
      UniformInOut​(Graph<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 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
    • Field Detail

      • graph

        protected Graph<V,​E> graph
        The graph for which the edge weights are defined.
    • Constructor Detail

      • UniformInOut

        public UniformInOut​(Graph<V,​E> graph)
        Creates an instance for the specified graph.
        Parameters:
        graph - the graph for which the edge weights will be defined
    • 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>