|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.layout.hierarchic.AbstractDrawer | +--y.layout.hierarchic.MedianLinearSegmentDrawer
This class implements the third phase of the hierarchic layout algorithm. Edges are represented as polylines with at most two bends. The algorithm has linear running time and is based on the article [BK01]:
U. Brandes and B. Koepf, Fast and Simple Horizontal Coordinate Assignment, Proceedings of 9th Symposium of Graph Drawing, LNCS, 2001.
Field Summary |
Fields inherited from class y.layout.hierarchic.AbstractDrawer |
distanceToNextNode, dummyMap, edgeLengthKey, graph, minimalEdgeDistance, minimalLayerDistance, minimalMultiEdgeDistance, minimalNodeDistance |
Fields inherited from interface y.layout.hierarchic.Drawer |
NODE_BORDER_BOTTOM, NODE_BORDER_LEFT, NODE_BORDER_RIGHT, NODE_BORDER_TOP, NODE_DISTANCE |
Constructor Summary | |
MedianLinearSegmentDrawer()
|
Method Summary | |
protected void |
assignCoordinates(NodeList[] layerLists,
DataProvider _layerID)
Performs coordinate assignment. |
protected void |
calcShift(LayoutGraph g,
Node v,
double[] x)
Calculate the shift values between the different classes of blocks. |
protected void |
dispose()
Frees held resources. |
protected void |
horizontalCompaction(LayoutGraph g,
double[] x,
NodeList[] layerLists)
Calculate coordinates. |
protected void |
init(Graph g,
NodeList[] layerLists)
Initializes data structures for all runs. |
static void |
markConflicts(NodeList[] layerLists,
EdgeMap conflictMark,
NodeMap dummyMap,
int[] pos)
Mark type 1 conflicts. |
protected void |
placeBlock(LayoutGraph g,
Node v,
double[] x)
This method implements the function place_block(v) in Algorithm 3 in [BK01]. |
protected void |
propagateCoordinates(LayoutGraph g)
Writes the calculated x values in the layout graph. |
protected void |
reinit(Graph g,
double[] x)
Initializes data structures for one basic step. |
void |
verticalAlignment(LayoutGraph g,
NodeList[] layerLists)
Calculates vertical alignment. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MedianLinearSegmentDrawer()
Method Detail |
protected void assignCoordinates(NodeList[] layerLists, DataProvider _layerID)
assignCoordinates
in class AbstractDrawer
protected void init(Graph g, NodeList[] layerLists)
protected void reinit(Graph g, double[] x)
x
- the array where the coordinates will be stored.public static void markConflicts(NodeList[] layerLists, EdgeMap conflictMark, NodeMap dummyMap, int[] pos)
layerLists
- the list of layers.conflictMark
- used to mark the conflicting edges.dummyMap
- map which returns true
for bends,
false
otherwise.pos
- is indexed by the index method of node and returns the rank of
a node inside the layer which contains the node.public void verticalAlignment(LayoutGraph g, NodeList[] layerLists)
g
- the graph for which the layout is calculated.layerLists
- the list of layers.protected void horizontalCompaction(LayoutGraph g, double[] x, NodeList[] layerLists)
g
- the graph for which the layout is calculated.x
- the array where the result is stored.protected void placeBlock(LayoutGraph g, Node v, double[] x)
calcShift()
.
protected void calcShift(LayoutGraph g, Node v, double[] x)
protected void propagateCoordinates(LayoutGraph g)
protected void dispose()
dispose
in class AbstractDrawer
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |