Partitions the graph into groups using edge betweenness centrality (see EdgeBetweenness(Graph, IEdgeMap, Boolean, IDataProvider) .

Namespace: yWorks.yFiles.Algorithms
Assembly: yWorks.yFilesSilverlight.Algorithms (in yWorks.yFilesSilverlight.Algorithms.dll) Version: 2.4.0.0

Syntax

C#
public static int EdgeBetweennessClustering( Graph graph, INodeMap clusterIDs, bool directed, int minGroupCount, int maxGroupCount, IDataProvider edgeCosts )
Visual Basic
Public Shared Function EdgeBetweennessClustering ( _ graph As Graph, _ clusterIDs As INodeMap, _ directed As Boolean, _ minGroupCount As Integer, _ maxGroupCount As Integer, _ edgeCosts As IDataProvider _ ) As Integer

Parameters

graph
Type: yWorks.yFiles.Algorithms..::..Graph
the input graph.
clusterIDs
Type: yWorks.yFiles.Algorithms..::..INodeMap
used as return value. This map gets a cluster ID of integer type for every node.
directed
Type: System..::..Boolean
whether or not to consider the edges of the graph as directed.
minGroupCount
Type: System..::..Int32
the minimum number of groups to be returned.
maxGroupCount
Type: System..::..Int32
the maximum number of groups to be returned. The smaller this value is chosen the faster the overall computation time. Note that the upper bound on the number of groups is graph.N(). Note, that the number of returned groups is never less than the number of connected components of the graph.
edgeCosts
Type: yWorks.yFiles.Algorithms..::..IDataProvider
if nullNothingnullptra null reference (Nothing in Visual Basic) the edges of the graph are considered to have equal cost. Otherwise it must provide a non-negative double value (its cost) for every edge.

Return Value

the number of different groups found.

Remarks

Partitions the graph into groups using edge betweenness centrality (see EdgeBetweenness(Graph, IEdgeMap, Boolean, IDataProvider) . In each iteration the edge with the highest betweenness centrality is removed from the graph. The method stops, if there are no more edges to remove. The clustering with the best quality reached during the process will be returned.
O(graph.E())*O(edgeBetweenness) (Note: is practical faster because edge betweenness is computed for subgraphs during the process and this algorithm terminates after maxGroupCount groups have been determined.)

See Also