de.cau.cs.kieler.klay.layered.intermediate
Class InvertedPortProcessor
java.lang.Object
de.cau.cs.kieler.core.alg.AbstractAlgorithm
de.cau.cs.kieler.klay.layered.intermediate.InvertedPortProcessor
- All Implemented Interfaces:
- IAlgorithm, ILayoutProcessor
public class InvertedPortProcessor
- extends AbstractAlgorithm
- implements ILayoutProcessor
Inserts dummy nodes to cope with inverted ports.
The problem is with edges coming from the left of a node being connected to a
port that's on its right side, or the other way around. Let a node of that kind
be in layer i
. This processor now takes the offending edge and connects
it to a new dummy node, also in layer i
. Finally, the dummy is connected
with the offending port. This means that once one of these cases occurs in the
graph, the layering is not proper anymore.
The dummy nodes are decorated with a
Properties.NODE_TYPE
property. They
are treated just like ordinary NodeType.LONG_EDGE
dummy nodes
This processor supports self-loops by not doing anything about them. That is, no
dummy nodes are created for edges whose source and target node are identical.
Note: the following phases must support in-layer connections for this to work.
- Precondition:
- a layered graph; nodes have fixed port sides.
- Postcondition:
- dummy nodes have been inserted for edges connected to
ports on odd sides; the graph may contain new in-layer connections.
- Slots:
- Before phase 3.
- Same-slot dependencies:
PortSideProcessor
- See Also:
PortSideProcessor
- Rating

Method Summary |
void |
process(LayeredGraph layeredGraph)
Performs the phase's work on the given graph. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InvertedPortProcessor
public InvertedPortProcessor()
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