 Type Parameters:
V
 the graph vertex typeE
 the graph edge type
 All Implemented Interfaces:
EdgeScoringAlgorithm<E,
Double>
A natural extension of betweenness to edges by counting the total shortest paths that pass through an edge. See the paper: Ulrik Brandes: On Variants of ShortestPath Betweenness Centrality and their Generic Computation. Social Networks 30(2):136145, 2008, for a nice discussion of different variants of betweenness centrality. Note that this implementation does not work for graphs which have multiple edges. Selfloops do not influence the result and are thus ignored.
This implementation allows the user to compute centrality contributions only from a subset of the graph vertices, i.e. to start shortest path computations only from a subset of the vertices. This allows centrality approximations in big graphs. Note that in this case, the user is responsible for any normalization necessary due to duplicate shortest paths that might occur in undirected graphs.
 Author:
 Dimitrios Michail

Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Strategy followed when counting paths. 
Constructor Summary
ConstructorDescriptionEdgeBetweennessCentrality
(Graph<V, E> graph) Construct a new instance.EdgeBetweennessCentrality
(Graph<V, E> graph, EdgeBetweennessCentrality.OverflowStrategy overflowStrategy) Construct a new instance.EdgeBetweennessCentrality
(Graph<V, E> graph, EdgeBetweennessCentrality.OverflowStrategy overflowStrategy, Iterable<V> startVertices) Construct a new instance. 
Method Summary

Constructor Details

EdgeBetweennessCentrality
Construct a new instance. Parameters:
graph
 the input graph

EdgeBetweennessCentrality
public EdgeBetweennessCentrality(Graph<V, E> graph, EdgeBetweennessCentrality.OverflowStrategy overflowStrategy) Construct a new instance. Parameters:
graph
 the input graphoverflowStrategy
 strategy to use if overflow is detected

EdgeBetweennessCentrality
public EdgeBetweennessCentrality(Graph<V, E> graph, EdgeBetweennessCentrality.OverflowStrategy overflowStrategy, Iterable<V> startVertices) Construct a new instance. Parameters:
graph
 the input graphoverflowStrategy
 strategy to use if overflow is detectedstartVertices
 vertices from which to start shortest path computations. This parameter allows the user to compute edge centrality contributions only from a subset of the vertices of the graph. If null the whole graph vertex set is used.


Method Details

getScores
Description copied from interface:EdgeScoringAlgorithm
Get a map with the scores of all edges Specified by:
getScores
in interfaceEdgeScoringAlgorithm<V,
E>  Returns:
 a map with all scores

getEdgeScore
Description copied from interface:EdgeScoringAlgorithm
Get an edge score Specified by:
getEdgeScore
in interfaceEdgeScoringAlgorithm<V,
E>  Parameters:
e
 the edge Returns:
 the score
