C# Class Smrf.NodeXL.Algorithms.ReciprocatedVertexPairRatioCalculator

Calculates the reciprocated vertex pair ratio for each of the graph's vertices.
The reciprocated vertex pair ratio for a vertex in a directed graph is the number of adjacent vertices the vertex is connected to with edges in both directions, divided by the number of adjacent vertices. It is not calculated for an undirected graph.

The calculations can handle self-loops, but they are rendered invalid if the graph has duplicate edges.

Inheritance: GraphMetricCalculatorBase
Show file Open project: 2014-sed-team3/term-project Class Usage Examples

Public Methods

Method Description
AssertValid ( ) : void
CalculateGraphMetrics ( IGraph graph ) : Nullable>.Dictionary
ReciprocatedVertexPairRatioCalculator ( ) : System

Initializes a new instance of the class.

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

Protected Methods

Method Description
CalculateReciprocatedVertexPairRatio ( IVertex oVertex, HashSet oVertexIDPairs ) : Nullable
GetVertexIDPairs ( IGraph oGraph ) : HashSet

Method Details

AssertValid() public method

public AssertValid ( ) : void
return void

CalculateGraphMetrics() public method

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

CalculateReciprocatedVertexPairRatio() protected method

protected CalculateReciprocatedVertexPairRatio ( IVertex oVertex, HashSet oVertexIDPairs ) : Nullable
oVertex IVertex
oVertexIDPairs HashSet
return Nullable

GetVertexIDPairs() protected method

protected GetVertexIDPairs ( IGraph oGraph ) : HashSet
oGraph IGraph
return HashSet

ReciprocatedVertexPairRatioCalculator() public method

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

TryCalculateGraphMetrics() public method

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