edu.uci.ics.jung.algorithms.scoring.util
Class UniformInOut<V,E>
java.lang.Object
edu.uci.ics.jung.algorithms.scoring.util.UniformInOut<V,E>
- All Implemented Interfaces:
- org.apache.commons.collections15.Transformer<VEPair<V,E>,Double>
public class UniformInOut<V,E>
- extends Object
- implements org.apache.commons.collections15.Transformer<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 Summary |
protected Graph<V,E> |
graph
The graph for which the edge weights are defined. |
Constructor Summary |
UniformInOut(Graph<V,E> graph)
Creates an instance for the specified graph. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
graph
protected Graph<V,E> graph
- The graph for which the edge weights are defined.
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
transform
public Double transform(VEPair<V,E> ve_pair)
- Specified by:
transform
in interface org.apache.commons.collections15.Transformer<VEPair<V,E>,Double>
- Throws:
IllegalArgumentException
- See Also:
Transformer.transform(Object)
Copyright © 2009. All Rights Reserved.