edu.uci.ics.jung.algorithms.importance
Class VoltageRanker<V,E>

java.lang.Object
  extended by edu.uci.ics.jung.algorithms.importance.VoltageRanker<V,E>

Deprecated. As of JUNG 2.0 beta, replaced with VoltageScorer.

public class VoltageRanker<V,E>
extends Object

Ranks vertices in a graph according to their 'voltage' in an approximate solution to the Kirchoff equations. This is accomplished by tying "source" vertices to specified positive voltages, "sink" vertices to 0 V, and iteratively updating the voltage of each other vertex to the (weighted) average of the voltages of its neighbors.

The resultant voltages will all be in the range [0, max] where max is the largest voltage of any source vertex (in the absence of negative source voltages; see below).

A few notes about this algorithm's interpretation of the graph data:

Author:
Joshua O'Madadhain, Tom Nelson

Field Summary
protected  double convergence_threshold
          Deprecated.  
protected  Map<E,Number> edge_weights
          Deprecated.  
protected  int max_iterations
          Deprecated.  
protected  Map<V,Number> voltages
          Deprecated.  
 
Constructor Summary
VoltageRanker(Map<E,Number> edge_weights, Map<V,Number> voltages, int num_iterations, double convergence_threshold)
          Deprecated. Creates an instance of VoltageRanker which uses the edge weights specified by edge_weights, and which stores the voltages (ranks) as specified by voltages.
VoltageRanker(Map<V,Number> voltages, int num_iterations, double threshold)
          Deprecated. Creates an instance of VoltageRanker which treats the edges as though they were unweighted, and which stores the voltages (ranks) as specified by voltages.
 
Method Summary
 void calculateVoltages(Graph<V,E> g, Map<V,Number> source_voltages, Set<V> sinks)
          Deprecated. Calculates the voltages for g based on the specified source and sink vertex sets.
 void calculateVoltages(Graph<V,E> g, Set<V> sources, Set<V> sinks)
          Deprecated. Calculates the voltages for g based on assigning each of the vertices in source a voltage of 1 V.
 void calculateVoltages(Graph<V,E> g, V source, V target)
          Deprecated. Calculates an approximation of the solution of the Kirchhoff equations for voltage, given that source supplies 1 V and target is tied to ground (O V).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

edge_weights

protected Map<E,Number> edge_weights
Deprecated. 

voltages

protected Map<V,Number> voltages
Deprecated. 

max_iterations

protected int max_iterations
Deprecated. 

convergence_threshold

protected double convergence_threshold
Deprecated. 
Constructor Detail

VoltageRanker

public VoltageRanker(Map<E,Number> edge_weights,
                     Map<V,Number> voltages,
                     int num_iterations,
                     double convergence_threshold)
Deprecated. 
Creates an instance of VoltageRanker which uses the edge weights specified by edge_weights, and which stores the voltages (ranks) as specified by voltages.


VoltageRanker

public VoltageRanker(Map<V,Number> voltages,
                     int num_iterations,
                     double threshold)
Deprecated. 
Creates an instance of VoltageRanker which treats the edges as though they were unweighted, and which stores the voltages (ranks) as specified by voltages.

Method Detail

calculateVoltages

public void calculateVoltages(Graph<V,E> g,
                              Set<V> sources,
                              Set<V> sinks)
Deprecated. 
Calculates the voltages for g based on assigning each of the vertices in source a voltage of 1 V.

Parameters:
sources - vertices tied to 1 V
sinks - vertices tied to 0 V
See Also:
calculateVoltages(Graph, Map, Set)

calculateVoltages

public void calculateVoltages(Graph<V,E> g,
                              Map<V,Number> source_voltages,
                              Set<V> sinks)
Deprecated. 
Calculates the voltages for g based on the specified source and sink vertex sets.

Parameters:
g - the graph for which voltages will be calculated
source_voltages - a map from vertices to source voltage values
sinks - a set of vertices to tie to 0 V

calculateVoltages

public void calculateVoltages(Graph<V,E> g,
                              V source,
                              V target)
Deprecated. 
Calculates an approximation of the solution of the Kirchhoff equations for voltage, given that source supplies 1 V and target is tied to ground (O V). Each other vertex will be assigned a voltage (rank) in the range [0,1].

Parameters:
source - the vertex whose voltage is tied to 1 V
target - the vertex whose voltage is tied to 0 V


Copyright © 2008 null. All Rights Reserved.