C# Class Smrf.NodeXL.Algorithms.ClusterCalculator

Partitions a graph into clusters.
Use the Algorithm property to specify the clustering algorithm to use.

Set the PutNeighborlessVerticesInOneCluster property to true to put the graph's neighborless vertices into one cluster.

IMPORTANT NOTE: If PutNeighborlessVerticesInOneCluster is true, CalculateGraphMetrics removes any neighborless vertices from the graph that is passed to it.

Inheritance: GraphMetricCalculatorBase
Exibir arquivo Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Property Type Description
m_bPutNeighborlessVerticesInOneCluster System.Boolean
m_eAlgorithm ClusterAlgorithm

Public Methods

Method Description
AssertValid ( ) : void
CalculateGraphMetrics ( IGraph graph ) : ICollection
ClusterCalculator ( ) : System

Initializes a new instance of the ClusterCalculator class.

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

Protected Methods

Method Description
CreateCommunities ( IVertexCollection oVertices, IDGenerator oIDGenerator ) : LinkedList
CreateCommunityOfNeighborlessVertices ( IEnumerable oNeighborlessVertices ) : Community
InitializeDeltaQs ( LinkedList oCommunities, DeltaQMaxHeap oDeltaQMaxHeap, Int32 iEdgesInGraph ) : void
MergeCommunities ( LinkedList oCommunities, CommunityPair oCommunityPairToMerge, DeltaQMaxHeap oDeltaQMaxHeap, Int32 iEdgesInGraph, IDGenerator oIDGenerator ) : void
RemoveNeighborlessVerticesFromGraph ( IGraph oGraph ) : List
TryCalculateClustersSnap ( IGraph oGraph, SnapGraphMetrics eSnapGraphMetric, BackgroundWorker oBackgroundWorker, ICollection &oGraphMetrics ) : System.Boolean
TryCalculateClustersWakitaTsurumi ( IGraph oGraph, BackgroundWorker oBackgroundWorker, ICollection &oGraphMetrics ) : System.Boolean

Method Details

AssertValid() public method

public AssertValid ( ) : void
return void

CalculateGraphMetrics() public method

public CalculateGraphMetrics ( IGraph graph ) : ICollection
graph IGraph
return ICollection

ClusterCalculator() public method

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

CreateCommunities() protected method

protected CreateCommunities ( IVertexCollection oVertices, IDGenerator oIDGenerator ) : LinkedList
oVertices IVertexCollection
oIDGenerator Smrf.NodeXL.Core.IDGenerator
return LinkedList

CreateCommunityOfNeighborlessVertices() protected method

protected CreateCommunityOfNeighborlessVertices ( IEnumerable oNeighborlessVertices ) : Community
oNeighborlessVertices IEnumerable
return Community

InitializeDeltaQs() protected method

protected InitializeDeltaQs ( LinkedList oCommunities, DeltaQMaxHeap oDeltaQMaxHeap, Int32 iEdgesInGraph ) : void
oCommunities LinkedList
oDeltaQMaxHeap DeltaQMaxHeap
iEdgesInGraph System.Int32
return void

MergeCommunities() protected method

protected MergeCommunities ( LinkedList oCommunities, CommunityPair oCommunityPairToMerge, DeltaQMaxHeap oDeltaQMaxHeap, Int32 iEdgesInGraph, IDGenerator oIDGenerator ) : void
oCommunities LinkedList
oCommunityPairToMerge CommunityPair
oDeltaQMaxHeap DeltaQMaxHeap
iEdgesInGraph System.Int32
oIDGenerator Smrf.NodeXL.Core.IDGenerator
return void

RemoveNeighborlessVerticesFromGraph() protected method

protected RemoveNeighborlessVerticesFromGraph ( IGraph oGraph ) : List
oGraph IGraph
return List

TryCalculateClustersSnap() protected method

protected TryCalculateClustersSnap ( IGraph oGraph, SnapGraphMetrics eSnapGraphMetric, BackgroundWorker oBackgroundWorker, ICollection &oGraphMetrics ) : System.Boolean
oGraph IGraph
eSnapGraphMetric SnapGraphMetrics
oBackgroundWorker System.ComponentModel.BackgroundWorker
oGraphMetrics ICollection
return System.Boolean

TryCalculateClustersWakitaTsurumi() protected method

protected TryCalculateClustersWakitaTsurumi ( IGraph oGraph, BackgroundWorker oBackgroundWorker, ICollection &oGraphMetrics ) : System.Boolean
oGraph IGraph
oBackgroundWorker System.ComponentModel.BackgroundWorker
oGraphMetrics ICollection
return System.Boolean

TryCalculateGraphMetrics() public method

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

Property Details

m_bPutNeighborlessVerticesInOneCluster protected_oe property

protected Boolean,System m_bPutNeighborlessVerticesInOneCluster
return System.Boolean

m_eAlgorithm protected_oe property

protected ClusterAlgorithm m_eAlgorithm
return ClusterAlgorithm