C# Class Smrf.NodeXL.ExcelTemplate.ReadabilityMetricCalculator2

Calculates readability metrics for the graph.
The readability metrics calculated by this class are based on work done by Cody Dunne and Ben Shneiderman at the University of Maryland.

This graph metric calculator differs from most other calculators in that it uses the vertices' locations and shapes. The other calculators look only at how the vertices are connected to each other. To avoid making the lower-level Algorithms project dependent on higher-level drawing classes (in particular, the VertexDrawingHistory class), there is no corresponding lower-level ReadabilityMetricCalculator class in the Smrf.NodeXL.Algorithms namespace, and the readability metrics cannot be calculated outside of this ExcelTemplate project.

Inheritance: GraphMetricCalculatorBase2
Datei anzeigen Open project: 2014-sed-team3/term-project

Protected Properties

Property Type Description
m_oGraphRectangleSize System.Windows.Size

Public Methods

Method Description
AssertValid ( ) : void
ReadabilityMetricCalculator2 ( System graphRectangleSize ) : System

Initializes a new instance of the class.

TryCalculateGraphMetrics ( IGraph graph, CalculateGraphMetricsContext calculateGraphMetricsContext, GraphMetricColumn &graphMetricColumns ) : System.Boolean

Protected Methods

Method Description
AddMissingPerEdgeEdgeCrossings ( IGraph oGraphClone, IGraph oGraph, GraphMetricValueWithID>.Dictionary oDictionary ) : void
CancellationPending ( BackgroundWorker oBackgroundWorker, Int32 iCalculationsCompleted, Int32 iTotalCalculations, String sProgressMessage ) : System.Boolean
CloneAndFilterGraph ( IGraph oGraph ) : IGraph
EdgesIntersect ( IEdge oEdge1, IEdge oEdge2 ) : System.Boolean
GetArea ( System.Windows.Media.Geometry oGeometry ) : Double
GetEdgeRectangle ( IEdge oEdge ) : Rect
TryCalculateEdgeInformation ( IGraph oGraphClone, BackgroundWorker oBackgroundWorker, Int32>.Dictionary &oEdgeInformation ) : System.Boolean
TryCalculateGraphRectangleCoverage ( IGraph oGraphClone, BackgroundWorker oBackgroundWorker, VertexInformation>.Dictionary oVertexInformations, Nullable &dGraphRectangleCoverage ) : System.Boolean
TryCalculateOverallEdgeCrossings ( IGraph oGraphClone, BackgroundWorker oBackgroundWorker, Int32>.Dictionary oEdgeInformation, VertexInformation>.Dictionary oVertexInformations, Nullable &dOverallEdgeCrossings ) : System.Boolean
TryCalculateOverallMetrics ( IGraph oGraphClone, ReadabilityMetricUserSettings oReadabilityMetricUserSettings, BackgroundWorker oBackgroundWorker, Int32>.Dictionary oEdgeInformation, VertexInformation>.Dictionary oVertexInformations, LinkedList oGraphMetricColumns ) : System.Boolean
TryCalculateOverallVertexOverlap ( IGraph oGraphClone, BackgroundWorker oBackgroundWorker, VertexInformation>.Dictionary oVertexInformations, Nullable &dOverallVertexOverlap ) : System.Boolean
TryCalculatePerEdgeAndPerVertexMetrics ( IGraph oGraphClone, IGraph oGraph, ReadabilityMetricUserSettings oReadabilityMetricUserSettings, BackgroundWorker oBackgroundWorker, Int32>.Dictionary oEdgeInformation, VertexInformation>.Dictionary oVertexInformations, LinkedList oGraphMetricColumns ) : System.Boolean
TryCalculatePerEdgeEdgeCrossings ( IGraph oGraphClone, IGraph oGraph, BackgroundWorker oBackgroundWorker, Int32>.Dictionary oEdgeInformation, ICollection &oPerEdgeEdgeCrossings ) : System.Boolean
TryCalculatePerVertexEdgeCrossings ( IGraph oGraphClone, BackgroundWorker oBackgroundWorker, Int32>.Dictionary oEdgeInformation, VertexInformation>.Dictionary oVertexInformations, ICollection &oPerVertexEdgeCrossings ) : System.Boolean
TryCalculatePerVertexVertexOverlap ( IGraph oGraphClone, BackgroundWorker oBackgroundWorker, VertexInformation>.Dictionary oVertexInformations, ICollection &oPerVertexVertexOverlap ) : System.Boolean
TryCalculateVertexInformations ( IGraph oGraphClone, BackgroundWorker oBackgroundWorker, VertexInformation>.Dictionary &oVertexInformations ) : System.Boolean
TryCombineEdges ( IGraph oGraphClone, BackgroundWorker oBackgroundWorker, String sProgressMessage, System.Windows.Media.GeometryGroup oUnionOfBounds ) : System.Boolean
TryCombineVertices ( IGraph oGraphClone, BackgroundWorker oBackgroundWorker, VertexInformation>.Dictionary oVertexInformations, String sProgressMessage, System.Windows.Media.GeometryGroup oUnionOfBounds, Double &dSumOfVertexAreas ) : System.Boolean

Method Details

AddMissingPerEdgeEdgeCrossings() protected method

protected AddMissingPerEdgeEdgeCrossings ( IGraph oGraphClone, IGraph oGraph, GraphMetricValueWithID>.Dictionary oDictionary ) : void
oGraphClone IGraph
oGraph IGraph
oDictionary GraphMetricValueWithID>.Dictionary
return void

AssertValid() public method

public AssertValid ( ) : void
return void

CancellationPending() protected method

protected CancellationPending ( BackgroundWorker oBackgroundWorker, Int32 iCalculationsCompleted, Int32 iTotalCalculations, String sProgressMessage ) : System.Boolean
oBackgroundWorker System.ComponentModel.BackgroundWorker
iCalculationsCompleted System.Int32
iTotalCalculations System.Int32
sProgressMessage String
return System.Boolean

CloneAndFilterGraph() protected method

protected CloneAndFilterGraph ( IGraph oGraph ) : IGraph
oGraph IGraph
return IGraph

EdgesIntersect() protected method

protected EdgesIntersect ( IEdge oEdge1, IEdge oEdge2 ) : System.Boolean
oEdge1 IEdge
oEdge2 IEdge
return System.Boolean

GetArea() protected method

protected GetArea ( System.Windows.Media.Geometry oGeometry ) : Double
oGeometry System.Windows.Media.Geometry
return Double

GetEdgeRectangle() protected method

protected GetEdgeRectangle ( IEdge oEdge ) : Rect
oEdge IEdge
return Rect

ReadabilityMetricCalculator2() public method

Initializes a new instance of the class.
public ReadabilityMetricCalculator2 ( System graphRectangleSize ) : System
graphRectangleSize System /// Size of the rectangle containing the graph, in WPF units. ///
return System

TryCalculateEdgeInformation() protected method

protected TryCalculateEdgeInformation ( IGraph oGraphClone, BackgroundWorker oBackgroundWorker, Int32>.Dictionary &oEdgeInformation ) : System.Boolean
oGraphClone IGraph
oBackgroundWorker System.ComponentModel.BackgroundWorker
oEdgeInformation Int32>.Dictionary
return System.Boolean

TryCalculateGraphMetrics() public method

public TryCalculateGraphMetrics ( IGraph graph, CalculateGraphMetricsContext calculateGraphMetricsContext, GraphMetricColumn &graphMetricColumns ) : System.Boolean
graph IGraph
calculateGraphMetricsContext CalculateGraphMetricsContext
graphMetricColumns GraphMetricColumn
return System.Boolean

TryCalculateGraphRectangleCoverage() protected method

protected TryCalculateGraphRectangleCoverage ( IGraph oGraphClone, BackgroundWorker oBackgroundWorker, VertexInformation>.Dictionary oVertexInformations, Nullable &dGraphRectangleCoverage ) : System.Boolean
oGraphClone IGraph
oBackgroundWorker System.ComponentModel.BackgroundWorker
oVertexInformations VertexInformation>.Dictionary
dGraphRectangleCoverage Nullable
return System.Boolean

TryCalculateOverallEdgeCrossings() protected method

protected TryCalculateOverallEdgeCrossings ( IGraph oGraphClone, BackgroundWorker oBackgroundWorker, Int32>.Dictionary oEdgeInformation, VertexInformation>.Dictionary oVertexInformations, Nullable &dOverallEdgeCrossings ) : System.Boolean
oGraphClone IGraph
oBackgroundWorker System.ComponentModel.BackgroundWorker
oEdgeInformation Int32>.Dictionary
oVertexInformations VertexInformation>.Dictionary
dOverallEdgeCrossings Nullable
return System.Boolean

TryCalculateOverallMetrics() protected method

protected TryCalculateOverallMetrics ( IGraph oGraphClone, ReadabilityMetricUserSettings oReadabilityMetricUserSettings, BackgroundWorker oBackgroundWorker, Int32>.Dictionary oEdgeInformation, VertexInformation>.Dictionary oVertexInformations, LinkedList oGraphMetricColumns ) : System.Boolean
oGraphClone IGraph
oReadabilityMetricUserSettings ReadabilityMetricUserSettings
oBackgroundWorker System.ComponentModel.BackgroundWorker
oEdgeInformation Int32>.Dictionary
oVertexInformations VertexInformation>.Dictionary
oGraphMetricColumns LinkedList
return System.Boolean

TryCalculateOverallVertexOverlap() protected method

protected TryCalculateOverallVertexOverlap ( IGraph oGraphClone, BackgroundWorker oBackgroundWorker, VertexInformation>.Dictionary oVertexInformations, Nullable &dOverallVertexOverlap ) : System.Boolean
oGraphClone IGraph
oBackgroundWorker System.ComponentModel.BackgroundWorker
oVertexInformations VertexInformation>.Dictionary
dOverallVertexOverlap Nullable
return System.Boolean

TryCalculatePerEdgeAndPerVertexMetrics() protected method

protected TryCalculatePerEdgeAndPerVertexMetrics ( IGraph oGraphClone, IGraph oGraph, ReadabilityMetricUserSettings oReadabilityMetricUserSettings, BackgroundWorker oBackgroundWorker, Int32>.Dictionary oEdgeInformation, VertexInformation>.Dictionary oVertexInformations, LinkedList oGraphMetricColumns ) : System.Boolean
oGraphClone IGraph
oGraph IGraph
oReadabilityMetricUserSettings ReadabilityMetricUserSettings
oBackgroundWorker System.ComponentModel.BackgroundWorker
oEdgeInformation Int32>.Dictionary
oVertexInformations VertexInformation>.Dictionary
oGraphMetricColumns LinkedList
return System.Boolean

TryCalculatePerEdgeEdgeCrossings() protected method

protected TryCalculatePerEdgeEdgeCrossings ( IGraph oGraphClone, IGraph oGraph, BackgroundWorker oBackgroundWorker, Int32>.Dictionary oEdgeInformation, ICollection &oPerEdgeEdgeCrossings ) : System.Boolean
oGraphClone IGraph
oGraph IGraph
oBackgroundWorker System.ComponentModel.BackgroundWorker
oEdgeInformation Int32>.Dictionary
oPerEdgeEdgeCrossings ICollection
return System.Boolean

TryCalculatePerVertexEdgeCrossings() protected method

protected TryCalculatePerVertexEdgeCrossings ( IGraph oGraphClone, BackgroundWorker oBackgroundWorker, Int32>.Dictionary oEdgeInformation, VertexInformation>.Dictionary oVertexInformations, ICollection &oPerVertexEdgeCrossings ) : System.Boolean
oGraphClone IGraph
oBackgroundWorker System.ComponentModel.BackgroundWorker
oEdgeInformation Int32>.Dictionary
oVertexInformations VertexInformation>.Dictionary
oPerVertexEdgeCrossings ICollection
return System.Boolean

TryCalculatePerVertexVertexOverlap() protected method

protected TryCalculatePerVertexVertexOverlap ( IGraph oGraphClone, BackgroundWorker oBackgroundWorker, VertexInformation>.Dictionary oVertexInformations, ICollection &oPerVertexVertexOverlap ) : System.Boolean
oGraphClone IGraph
oBackgroundWorker System.ComponentModel.BackgroundWorker
oVertexInformations VertexInformation>.Dictionary
oPerVertexVertexOverlap ICollection
return System.Boolean

TryCalculateVertexInformations() protected method

protected TryCalculateVertexInformations ( IGraph oGraphClone, BackgroundWorker oBackgroundWorker, VertexInformation>.Dictionary &oVertexInformations ) : System.Boolean
oGraphClone IGraph
oBackgroundWorker System.ComponentModel.BackgroundWorker
oVertexInformations VertexInformation>.Dictionary
return System.Boolean

TryCombineEdges() protected method

protected TryCombineEdges ( IGraph oGraphClone, BackgroundWorker oBackgroundWorker, String sProgressMessage, System.Windows.Media.GeometryGroup oUnionOfBounds ) : System.Boolean
oGraphClone IGraph
oBackgroundWorker System.ComponentModel.BackgroundWorker
sProgressMessage String
oUnionOfBounds System.Windows.Media.GeometryGroup
return System.Boolean

TryCombineVertices() protected method

protected TryCombineVertices ( IGraph oGraphClone, BackgroundWorker oBackgroundWorker, VertexInformation>.Dictionary oVertexInformations, String sProgressMessage, System.Windows.Media.GeometryGroup oUnionOfBounds, Double &dSumOfVertexAreas ) : System.Boolean
oGraphClone IGraph
oBackgroundWorker System.ComponentModel.BackgroundWorker
oVertexInformations VertexInformation>.Dictionary
sProgressMessage String
oUnionOfBounds System.Windows.Media.GeometryGroup
dSumOfVertexAreas Double
return System.Boolean

Property Details

m_oGraphRectangleSize protected_oe property

protected Size,System.Windows m_oGraphRectangleSize
return System.Windows.Size