de.cau.cs.kieler.klay.layered
Class CompoundKGraphImporter
java.lang.Object
de.cau.cs.kieler.klay.layered.AbstractGraphImporter<KNode>
de.cau.cs.kieler.klay.layered.KGraphImporter
de.cau.cs.kieler.klay.layered.CompoundKGraphImporter
- All Implemented Interfaces:
- IGraphImporter<KNode>
public class CompoundKGraphImporter
- extends KGraphImporter
Manages the transformation of Compound KGraphs to LayeredGraphs.
- Rating

Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompoundKGraphImporter
public CompoundKGraphImporter()
importGraph
public LayeredGraph importGraph(KNode kgraph)
- Create a layered graph from the given graph.
- Specified by:
importGraph
in interface IGraphImporter<KNode>
- Overrides:
importGraph
in class KGraphImporter
- Parameters:
kgraph
- the graph to turn into a layered graph.
- Returns:
- a layered graph, or
null
if the input was not recognized
isDescendant
public static boolean isDescendant(KNode node,
KNode candidate)
- Checks, if a KNode is descendant of another in the inclusion tree. attention: returns true,
if nodes are equal.
- Parameters:
node
- node that is the possible ancestor.candidate
- node that is the possible descendant.
- Returns:
- returns a boolean value indicating, if candidate is descendant of node (false if
nodes are equal).
applyLayout
public void applyLayout(LayeredGraph layeredGraph)
- Apply the computed layout of the given layered graph to the original input graph.
- Precondition:
- the graph has all its dummy nodes and edges removed;
edges that were reversed during layout have been restored to their original
orientation
- Postcondition:
- none
- Specified by:
applyLayout
in interface IGraphImporter<KNode>
- Overrides:
applyLayout
in class KGraphImporter
- Parameters:
layeredGraph
- a graph for which layout is applied