org.graffiti.plugins.algorithms.reingoldtilford
Class BubbleSortChildOrderStrategy
java.lang.Object
org.graffiti.plugins.algorithms.reingoldtilford.BubbleSortChildOrderStrategy
- All Implemented Interfaces:
- ChildOrderStrategy
public class BubbleSortChildOrderStrategy
- extends Object
- implements ChildOrderStrategy
Tries to minimize the width of the tree by inserting all children into a
TreeCombinationList
and then reducing the width by repeatedly swaping
trees in the list.
- Version:
- $Revision$ $Date$
- Author:
- Andreas Gleißner
- See Also:
ChildOrderPolicy.BUBBLE_SORT
BubbleSortChildOrderStrategy
public BubbleSortChildOrderStrategy()
combineChildren
public void combineChildren(Tree parent,
ReingoldTilfordAlgorithm algorithm)
- Combines the tree layouts of the children of parent.
Preconditions:
parent.getChildren().size() > 1
- Specified by:
combineChildren
in interface ChildOrderStrategy
- Parameters:
parent
- the Tree
whose children are to be combined.algorithm
- the Reingold-Tilford-Algorithm.- See Also:
ChildOrderPolicy.combineChildren(Tree, ReingoldTilfordAlgorithm)
Generated at 2012-05-30 11:01:25 PM CEST