Search this API

y.algo
Class AggregationInfo

java.lang.Object
  extended by y.algo.AggregationInfo

public class AggregationInfo
extends java.lang.Object

The result of a NodeAggregation.aggregate(Graph, NodeMap) run is a hierarchical nested clustering structure. Such a structure can be modeled by a directed tree which we encode by means of a set of AggregationInfo instances.

More precisely, each node of the original graph is mapped to a unique AggregationInfo instance. The mapping is stored in the NodeMap that is passed to method NodeAggregation.aggregate(Graph, NodeMap). Each AggregationInfo has a reference to its parent which induces a tree structure. There is always exactly one AggregationInfo without a parent that represents the root of the tree. Property NodeAggregation.setNodesOnlyOnLeavesAllowed(boolean) allows to specify whether nodes are only mapped to leaves of the tree structure or if they can also be mapped to inner nodes.

Note that there are AggregationInfo instances that are not associated with a node of the original graph. These instances always represent an inner element of the tree structure.

 
Your browser does not support SVG content.

Method Summary
 int getDescendantCount()
          Returns the number of nodes of the original graph that are descendants of this aggregate.
 double getDescendantWeightSum()
          Returns the sum of the weights of nodes of the original graph that are descendants of this aggregate.
 double getMaximumDescendantWeight()
          Returns the maximum weight of a node of the original graph that is a descendant of this aggregate.
 AggregationInfo getParentAggregation()
          Returns the parent info of this info.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getParentAggregation

public AggregationInfo getParentAggregation()
Returns the parent info of this info.

Returns:
the parent info

getDescendantCount

public int getDescendantCount()
Returns the number of nodes of the original graph that are descendants of this aggregate.

Returns:
the number of nodes of the original graph that are descendants of this aggregate

getDescendantWeightSum

public double getDescendantWeightSum()
Returns the sum of the weights of nodes of the original graph that are descendants of this aggregate.

 
The weight of a node corresponds to its custom weight (see NodeAggregation.NODE_WEIGHT_DPKEY) or, if no custom weights are specified, to its Centrality.pageRank(Graph, NodeMap).
Returns:
the sum of the weights of nodes of the original graph that are descendants of this aggregate

getMaximumDescendantWeight

public double getMaximumDescendantWeight()
Returns the maximum weight of a node of the original graph that is a descendant of this aggregate.

 
The weight of a node corresponds to its custom weight (see NodeAggregation.NODE_WEIGHT_DPKEY) or, if no custom weights are specified, to its Centrality.pageRank(Graph, NodeMap).
Returns:
the maximum weight of a node of the original graph that is a descendant of this aggregate

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.