C# Class Smrf.NodeXL.Algorithms.BrandesFastCentralityCalculator

Calculates the betweenness and closeness centralities for each of the graph's vertices.
If a vertex is isolated, its betweenness and closeness centralities are zero.

In a previous version, the centralities were calculated simultaneously by this class using the algorithm described in the paper "A Faster Algorithm for Betweenness Centrality," by Ulrik Brandes. The paper can be found here:

http://www.inf.uni-konstanz.de/algo/publications/b-fabc-01.pdf

Section 4 of the paper explains how other centrality measures can be computed within the same algorithm at little additional cost. That is why closeness centrality was calculated by this class along with betweenness.

Starting with version 1.0.1.122 of NodeXL, the centralities are calculated using the SNAP graph library, which is much faster than the previous NodeXL code. SNAP calculates betweenness and closeness centralities separately, so it might make sense to split this class in two in a future release. Or would it make more sense to modify SNAP to calculate the two simultaneously, as suggested by Brandes?

Inheritance: GraphMetricCalculatorBase
Mostra file Open project: 2014-sed-team3/term-project

Public Methods

Method Description
AssertValid ( ) : void
BrandesFastCentralityCalculator ( ) : System

Initializes a new instance of the class.

CalculateGraphMetrics ( IGraph graph ) : BrandesVertexCentralities>.Dictionary
TryCalculateGraphMetrics ( IGraph graph, BackgroundWorker backgroundWorker, BrandesVertexCentralities>.Dictionary &graphMetrics ) : System.Boolean

Method Details

AssertValid() public method

public AssertValid ( ) : void
return void

BrandesFastCentralityCalculator() public method

Initializes a new instance of the class.
public BrandesFastCentralityCalculator ( ) : System
return System

CalculateGraphMetrics() public method

public CalculateGraphMetrics ( IGraph graph ) : BrandesVertexCentralities>.Dictionary
graph IGraph
return BrandesVertexCentralities>.Dictionary

TryCalculateGraphMetrics() public method

public TryCalculateGraphMetrics ( IGraph graph, BackgroundWorker backgroundWorker, BrandesVertexCentralities>.Dictionary &graphMetrics ) : System.Boolean
graph IGraph
backgroundWorker System.ComponentModel.BackgroundWorker
graphMetrics BrandesVertexCentralities>.Dictionary
return System.Boolean