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

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

public class SelfLoopProcessor
extends AbstractAlgorithm
implements ILayoutProcessor

This processor does some work to ensure that other phases and processors can handle self-loops correctly. In detail, it handles the following cases:

North / South to West
The edge is reversed to maintain a left-to-right data flow.
East to North / South
The edge is reversed to maintain a left-to-right data flow.
East to West
The edge is reversed to maintain a left-to-right data flow. A long-edge dummy node is placed in between.
West to East
A long-edge dummy is placed in between.
North to South
Nothing is done.
South to North
The edge is reversed to maintain a top-down data flow.

The processor thus reduces the number of different cases of self-loops.

Precondition:
a layered graph.
Postcondition:
long edge dummies were inserted for special kinds of self loops.
Slots:
Before phase 3.
Same-slot dependencies:
InvertedPortProcessor

Rating red

Constructor Summary
SelfLoopProcessor()
           
 
Method Summary
 void process(LayeredGraph layeredGraph)
          Performs the phase's work on the given graph.
 
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

SelfLoopProcessor

public SelfLoopProcessor()
Method Detail

process

public void process(LayeredGraph layeredGraph)
Performs the phase's work on the given graph.

Specified by:
process in interface ILayoutProcessor
Parameters:
layeredGraph - a layered graph