de.cau.cs.kieler.klay.layered.p2layers
Class LongestPathLayerer

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

public class LongestPathLayerer
extends AbstractAlgorithm
implements ILayoutPhase

The most basic layering algorithm, which assign layers according to the longest path to a sink.

Precondition:
the graph has no cycles
Postcondition:
all nodes have been assigned a layer such that edges connect only nodes from layers with increasing indices

Rating red

Constructor Summary
LongestPathLayerer()
           
 
Method Summary
 IntermediateProcessingStrategy getIntermediateProcessingStrategy(LayeredGraph graph)
          Returns the intermediate layout processors this phase depends on.
 void process(LayeredGraph thelayeredGraph)
          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

LongestPathLayerer

public LongestPathLayerer()
Method Detail

getIntermediateProcessingStrategy

public IntermediateProcessingStrategy getIntermediateProcessingStrategy(LayeredGraph graph)
Returns the intermediate layout processors this phase depends on.

Specified by:
getIntermediateProcessingStrategy in interface ILayoutPhase
Parameters:
graph - the layered graph to be processed. The strategy may vary depending on certain properties of the graph.
Returns:
intermediate processing strategy. May be null.

process

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

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