|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.hierarchic.incremental.DefaultLayerSequencer
public class DefaultLayerSequencer
This class implements the second phase of the Sugiyama algorithm. It minimizes the crossings in the diagram by using either the barycentric or median heuristic.
| Field Summary | |
|---|---|
static byte |
BARYCENTER_HEURISTIC
Weight assignment heuristic specifier. |
static byte |
MEDIAN_HEURISTIC
Weight assignment heuristic specifier. |
| Constructor Summary | |
|---|---|
DefaultLayerSequencer()
|
|
| Method Summary | |
|---|---|
long |
getMaximalDuration()
Returns the proposed maximal duration for the calculation of the sequence. |
int |
getRandomizationRounds()
Returns the number of randomized rounds this algorithm will try if there was no optimal solution. |
byte |
getWeightHeuristic()
Returns the currently set weight heuristic. |
boolean |
isGroupTranspositionEnabled()
Returns whether or not the group transposition heuristic should be used. |
boolean |
isTranspositionEnabled()
Returns whether or not the transposition crossing minimization heuristic should be used. |
void |
sequenceNodeLayers(LayoutGraph graph,
Layers glayers,
LayoutDataProvider ldp,
ItemFactory itemFactory)
Called by HierarchicLayouter during the second phase. |
void |
setGroupTranspositionEnabled(boolean b)
Specifies whether or not an additional crossing minimization heuristic should be used in the presence of grouped graphs. |
void |
setMaximalDuration(long msec)
Sets the maximum amount of time granted for this sequencer per execution. |
void |
setRandomizationRounds(int randomizationRounds)
Sets the number of additional rounds the algorithm will restart with randomized solutions as long as there might be a better solution to the current best. |
void |
setTranspositionEnabled(boolean b)
Specifies whether or not an additional crossing minimization heuristic should be used. |
void |
setWeightHeuristic(byte h)
Sets the weight heuristic to be used. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte BARYCENTER_HEURISTIC
public static final byte MEDIAN_HEURISTIC
| Constructor Detail |
|---|
public DefaultLayerSequencer()
| Method Detail |
|---|
public void setTranspositionEnabled(boolean b)
b - whether to use the heuristicpublic boolean isTranspositionEnabled()
setTranspositionEnabled(boolean)public void setGroupTranspositionEnabled(boolean b)
b - whether to use the heuristicpublic boolean isGroupTranspositionEnabled()
setGroupTranspositionEnabled(boolean)public void setWeightHeuristic(byte h)
BARYCENTER_HEURISTIC is set.
IllegalArgumentException - if the constant is unknownh - one of BARYCENTER_HEURISTIC and
MEDIAN_HEURISTIC.public byte getWeightHeuristic()
setWeightHeuristic(byte)public long getMaximalDuration()
10000
public int getRandomizationRounds()
50.public void setRandomizationRounds(int randomizationRounds)
randomizationRounds - the new number of additional roundspublic void setMaximalDuration(long msec)
msec - granted time in milliseconds
public void sequenceNodeLayers(LayoutGraph graph,
Layers glayers,
LayoutDataProvider ldp,
ItemFactory itemFactory)
SequencerHierarchicLayouter during the second phase.
Calculates a sequence of the nodes in layers and finally
writes back the calculated sequence using the Layer.setNodeOrder(y.base.YList)
method.
sequenceNodeLayers in interface Sequencergraph - the graph that contains the elements from layersglayers - the Layer implementation that holds the Layers for sequencingldp - the LayoutDataProvider that provides the necessary NodeData
and EdgeDataitemFactory - an ItemFactory implementation that can be used to modify the
graph consistently
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||