de.cau.cs.kieler.klay.layered.intermediate
Class BigNodesProcessor

java.lang.Object
  extended by de.cau.cs.kieler.core.alg.AbstractAlgorithm
      extended by de.cau.cs.kieler.klay.layered.intermediate.BigNodesProcessor
All Implemented Interfaces:
IAlgorithm, ILayoutProcessor

public class BigNodesProcessor
extends AbstractAlgorithm
implements ILayoutProcessor

The main class of the big node handler component. It offers a method to split wide nodes of the given graph into smaller, equal-sized ones to allow the former wide node to be assigned to multiple consecutive layers. After layerer execution, the thereby determined layer assignment may be esthetically optimized by invoking segmentateLayering(), which segmentates the layering, i.e. two nodes will be be placed into layers, so that they are not disjunct regarding the layers they are assigned to, and the narrower of the two nodes is not assigned to all layers, the wider nodes is also placed in unless there exists a node, that covers all layers, the two nodes are assigned to. For more information, see Philipp Doehring: Algorithmen zur Layerzuweisung, Bachelor Thesis, 2010. FIXME this doesn't work yet, since a postprocessor is needed that reverts the changes made here

Rating red

Constructor Summary
BigNodesProcessor()
           
 
Method Summary
 void process(LayeredGraph theLayeredGraph)
          Main method for the Big-Node-Handler.
 void segmentateLayering()
          Main method of the Big-Node-Splitter.
 
Methods inherited from class de.cau.cs.kieler.core.alg.AbstractAlgorithm
getMonitor, reset, reset, setProgressMonitor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.cau.cs.kieler.core.alg.IAlgorithm
reset, reset, setProgressMonitor
 

Constructor Detail

BigNodesProcessor

public BigNodesProcessor()
Method Detail

process

public void process(LayeredGraph theLayeredGraph)
Main method for the Big-Node-Handler. It splits all wide nodes in the graph into smaller, equal sized nodes by insertion of dummy nodes. All incoming edges incident to the original wide node will remain on the node, but outgoing back edges will be moved to the rightmost inserted dummy node. Note that after a wide node has been split, its width in layers stored in width will not be updated, i.e. it keeps its value of 1 plus the number of inserted dummy nodes to split the specific wide node.

Specified by:
process in interface ILayoutProcessor
Parameters:
theLayeredGraph - the layered graph to put all nodes into
See Also:
width

segmentateLayering

public void segmentateLayering()
Main method of the Big-Node-Splitter. It segmentates the layering after layerer execution by shifting single nodes to the right (i.e. placing them into a layer with a higher ID). Two wide nodes (i.e. nodes with a width > 1) will be be placed into layers, so that they are not disjunct regarding the layers, they are assigned to, and the narrower of the two nodes is not assigned to all layers, the wider nodes is also placed in unless there exists a node, that covers all layers, the two nodes are assigned to. Note that before invoking this method, the splitWideNodes() -procedure has to be called first. This will be checked if not or the set of nodes has been changed since that invocation. TODO if this is to be supported again, it must be moved into an own processor

See Also:
splitWideNodes(LayeredGraph)