documentationfor yFiles for HTML 3.0.0.3

Graph Analysis

One of the key features of yFiles is its collection of sophisticated algorithms for analyzing graph structures.

These algorithms are located in the namespace yfiles.analysis.

The following table provides an overview of the available analysis algorithm classes:

Analysis Algorithms grouped by topic
Topic Algorithm Description

Centrality

BetweennessCentrality

Calculates a centrality value for nodes and edges based on how many shortest paths in the graph traverse them.

DegreeCentrality

Calculates a centrality value for nodes based on the number of their incoming and/or outgoing edges.

WeightCentrality

Calculates a centrality value for nodes based on the added weights of their incoming and/or outgoing edges.

ClosenessCentrality

Calculates a centrality value for nodes based on their shortest path distances to all other nodes.

GraphCentrality

Calculates a centrality value for nodes based on the longest of their shortest path distances to all other nodes.

EigenvectorCentrality

Calculates a centrality value for nodes using a dominant eigenvector of the graph’s adjacency matrix.

PageRank

Calculates a rank value for nodes based on the rank of their predecessors.

Clustering

BiconnectedComponentClustering

Partitions the graph into clusters that consist of biconnected components.

EdgeBetweennessClustering

Partitions the graph into a specified number of clusters that consist of components that are isolated after iteratively removing edges with the highest betweenness centrality.

HierarchicalClustering

Partitions the graph into a hierarchy of clusters. Clusters are combined into a parent cluster based on the distances between the nodes in the child clusters.

KMeansClustering

Partitions the graph into K clusters that consist of the nodes closest to the clusters' mean (or centroid).

LouvainModularityClustering

Detects the communities/clusters in the graph by applying the Louvain modularity method.

LabelPropagationClustering

Detects the communities/clusters in the graph by propagating virtual labels.

Connectivity

ConnectedComponents

Partitions the graph into components that consist of nodes which are all connected by undirected paths.

BiconnectedComponents

Partitions the graph into components that consist of nodes which are all connected by undirected paths even if one of the nodes in a component were to be removed.

StronglyConnectedComponents

Partitions the graph into components that consist of nodes which are all connected by directed paths.

Bipartition

Partitions the graph into two sets of nodes such that all edges connect nodes in the first set with nodes in the second set.

IndependentSets

Partitions the graph into independent sets that consist of nodes that are not connected to each other.

KCoreComponents

Calculates the subgraph components where each node has at least a user-specified degree.

Path-related

ShortestPath

Finds the shortest path between two nodes.

Paths

Finds all simple paths between multiple start and end nodes.

SingleSourceShortestPaths

Finds the shortest paths between one start node and multiple end nodes.

AllPairsShortestPaths

Finds the shortest paths between multiple start and end nodes.

Cycle

Finds a cyclic path in the graph if one exists.

CycleEdges

Finds all edges that are part of at least one simple cycle in the graph.

Chains

Finds all maximal paths in the graph where each inner node has only two attached edges.

LongestPath

Finds the longest directed path in an acyclic graph.

Reachability

Finds all nodes that are reachable from one or more start nodes by a path.

Tree-related

TreeAnalysis

Analyzes a tree graph and calculates important properties of the tree structure.

SpanningTree

Finds a subset of edges that induce a tree connecting all nodes.

FeedbackEdgeSet

Finds a subset of edges whose removal or reversal would make the graph acyclic.

Network Flows

MaximumFlow

Finds the maximum flow from source to sink nodes through a network of edges where each edge has a specified maximum flow capacity.

MinimumCostFlow

Finds the cheapest possible way of sending a certain amount of flow through a network of edges where each edge has a specified maximum flow capacity and flow costs.

Transitivity

TransitiveClosure

Finds all node pairs that are connected by a path but not by a single edge.

TransitiveReduction

Finds all edges that could be removed so that their source and target nodes are still connected by a path.

TransitiveEdges

Creates the transitive edges that connect the selected nodes of a graph.

Structural

GraphStructureAnalyzer

Provides methods that check structural properties of the graph.

CliqueSubstructures

Detects the cliques of the graph. A clique is a subset of nodes that are all adjacent to each other.

TreeSubstructures

Detects the subtrees of the graph.

StarSubstructures

Detects the stars of the graph. A star consists of a node that is connected to multiple nodes with degree one.

CycleSubstructures

Detects the isolated cycles of the graph where at most one edge connects the cycle with the remaining graph.

ChainSubstructures

Detects the chains of the graph.

Other

Neighborhood

Finds all nodes whose paths to one or multiple start nodes have at most a given number of edges.

Bfs

Provides layers that consist of nodes whose shortest paths to one or multiple start nodes have the same number of edges.

NodeAggregation

Aggregates the nodes of a given graph and creates a hierarchical clustering structure subject to user-specified constraints.

RankAssignment

Solves the rank assignment problem using the simplex method. This method assigns a minimum rank to the nodes in an acyclic graph.

Intersections

Finds intersections and overlaps between nodes, edges, and labels in a graph.

Note
If it is required to run analysis algorithms on an instance of LayoutGraph, please see class LayoutGraphAlgorithms. It offers static methods that work on LayoutGraph. Note that this should only be necessary if you implement your own ILayoutAlgorithm, ILayoutStage, or another customization of the layout part.