documentationfor yFiles for HTML 3.0.0.3

LayoutGraphNodeAggregation

This class realizes an algorithm that aggregates nodes in a LayoutGraph and creates a hierarchical clustering structure subject to user-specified constraints like the type of nodes as well as the preferred minimum and maximum size of a cluster.

Inheritance Hierarchy
LayoutGraphNodeAggregation

Remarks

Important: This class is designed for graphs of type LayoutGraph. To compute a node aggregation directly on a graph of type IGraph, please refer to NodeAggregation.

The algorithm can be started via method aggregate. The result of the aggregation can be used to (interactively) visualize parts of large graphs.

Note that the resulting clustering structure corresponds to a directed rooted tree which we encode by means of a set of NodeAggregationInfo instances. More precisely, each node of the original graph is mapped to a unique NodeAggregationInfo instance. This mapping is stored in the IMapper<K,V> that is passed to method aggregate. Each NodeAggregationInfo has a reference to its parent which induces a directed tree structure. There is always exactly one NodeAggregationInfo without a parent that represents the root of the tree. Property nodesOnlyOnLeaves allows to specify whether nodes are only mapped to leaves of the tree structure or if they can also be mapped to inner nodes.

Property aggregationPolicy allows to specify whether the algorithm should consider STRUCTURAL properties (i.e., considering the connectivity) for the aggregation or GEOMETRIC properties (i.e., the distance between nodes). For the second policy, the coordinates of the nodes are taken from the layout property, so that it is important to specify proper coordinates and not use a structure-only graph instance.

Default Values of Properties

aggregationPolicySTRUCTURAL
maximumClusterSize10
minimumClusterSize5
nodesOnlyOnLeavestrueNodes are only mapped to leaves of the aggregation tree.
nodeTypePolicyIGNORE
stopDurationMAX_VALUEThe algorithm runs unrestricted.

Type Details

yFiles module
algorithms
If using GEOMETRIC, it is important to use a LayoutGraph instance containing coordinates for the nodes. A structure-only graph instance will not yield useful results.

Constructors

Properties

Methods

Constants