edu.uci.ics.jung.algorithms.scoring.util
Class UniformDegreeWeight<V,E>

java.lang.Object
  extended by edu.uci.ics.jung.algorithms.scoring.util.UniformDegreeWeight<V,E>
All Implemented Interfaces:
org.apache.commons.collections15.Transformer<VEPair<V,E>,Double>

public class UniformDegreeWeight<V,E>
extends Object
implements org.apache.commons.collections15.Transformer<VEPair<V,E>,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
UniformDegreeWeight(Hypergraph<V,E> graph)
          Creates an instance for the specified graph.
 
Method Summary
 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(Hypergraph<V,E> graph)
Creates an instance for the specified graph.

Method Detail

transform

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


Copyright © 2011. All Rights Reserved.