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

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

public class EdgeAndLayerConstraintEdgeReverser
extends AbstractAlgorithm
implements ILayoutProcessor

Makes sure nodes with edge or layer constraints have only incoming or only outgoing edges, as appropriate. This is done even before cycle breaking because the result may already break some cycles. This processor is required for LayerConstraintProcessor to work correctly. If edge constraints are in conflict with layer constraints, the latter take precedence. Furthermore, this processor handles nodes with fixed port sides for which all ports are reversed, i.e. input ports are on the right and output ports are on the left. All incident edges are reversed in such cases.

Precondition:
an unlayered graph.
Postcondition:
nodes with layer constraints have only incoming or only outgoing edges, as appropriate.
Slots:
Before phase 1.
Same-slot dependencies:
None.

See Also:
LayerConstraintProcessor
Rating red

Constructor Summary
EdgeAndLayerConstraintEdgeReverser()
           
 
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

EdgeAndLayerConstraintEdgeReverser

public EdgeAndLayerConstraintEdgeReverser()
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