org.graffiti.plugins.algorithms.reingoldtilford
Class BestInsertionChildOrderStrategy

java.lang.Object
  extended by org.graffiti.plugins.algorithms.reingoldtilford.BestInsertionChildOrderStrategy
All Implemented Interfaces:
ChildOrderStrategy

public class BestInsertionChildOrderStrategy
extends Object
implements ChildOrderStrategy

Tries to minimize the width of the tree by successively inserting the children into a TreeCombinationList at the position that respectively yields in the minimal width of the list.

Version:
$Revision$ $Date$
Author:
Andreas Gleißner
See Also:
ChildOrderPolicy.BEST_INSERTION

Constructor Summary
BestInsertionChildOrderStrategy()
           
 
Method Summary
 void combineChildren(Tree parent, ReingoldTilfordAlgorithm algorithm)
          Combines the tree layouts of the children of parent.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BestInsertionChildOrderStrategy

public BestInsertionChildOrderStrategy()
Method Detail

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