|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.jung.algorithms.importance.VoltageRanker<V,E>
VoltageScorer
.
public class VoltageRanker<V,E>
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:
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 |
---|
protected Map<E,Number> edge_weights
protected Map<V,Number> voltages
protected int max_iterations
protected double convergence_threshold
Constructor Detail |
---|
public VoltageRanker(Map<E,Number> edge_weights, Map<V,Number> voltages, int num_iterations, double convergence_threshold)
VoltageRanker
which uses the
edge weights specified by edge_weights
, and which stores
the voltages (ranks) as specified by voltages
.
public VoltageRanker(Map<V,Number> voltages, int num_iterations, double threshold)
VoltageRanker
which treats the
edges as though they were unweighted, and which stores
the voltages (ranks) as specified by voltages
.
Method Detail |
---|
public void calculateVoltages(Graph<V,E> g, Set<V> sources, Set<V> sinks)
g
based on assigning each of the
vertices in source
a voltage of 1 V.
sources
- vertices tied to 1 Vsinks
- vertices tied to 0 VcalculateVoltages(Graph, Map, Set)
public void calculateVoltages(Graph<V,E> g, Map<V,Number> source_voltages, Set<V> sinks)
g
based on the specified source
and sink vertex sets.
g
- the graph for which voltages will be calculatedsource_voltages
- a map from vertices to source voltage valuessinks
- a set of vertices to tie to 0 Vpublic void calculateVoltages(Graph<V,E> g, V source, V target)
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].
source
- the vertex whose voltage is tied to 1 Vtarget
- the vertex whose voltage is tied to 0 V
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |