Class UniformInOut<V,E>
java.lang.Object
edu.uci.ics.jung.algorithms.scoring.util.UniformInOut<V,E>
- All Implemented Interfaces:
com.google.common.base.Function<VEPair<V,
,E>, Double> Function<VEPair<V,
E>, Double>
public class UniformInOut<V,E>
extends Object
implements com.google.common.base.Function<VEPair<V,E>,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 Details
-
graph
The graph for which the edge weights are defined.
-
-
Constructor Details
-
UniformInOut
Creates an instance for the specified graph.- Parameters:
graph
- the graph for which the edge weights will be defined
-
-
Method Details