- 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.