|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.hierarchic.ClassicLayerSequencer
public class ClassicLayerSequencer
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 Object |
GROUP_KEY
This is the key, which must be used to register the DataProvider which contains the mappings between nodes and group ids. |
static byte |
MEDIAN_HEURISTIC
Weight assignment heuristic specifier. |
| Constructor Summary | |
|---|---|
ClassicLayerSequencer()
Instantiates a new layer sequencer. |
|
| Method Summary | |
|---|---|
void |
adoptValues(LayerSequencer otherSequencer)
Tries to adopt/copy the settings of the given LayerSequencer to this sequencer. |
NodeList[] |
getLayers(LayoutGraph g,
NodeMap layerMap,
int maxLayer)
Calculates the sequence of nodes within each layer. |
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. |
int |
getRecentCrossingNumber()
Returns the number of edge crossings that were produced by this sequencer the last time it was applied to a graph. |
boolean |
getRemoveFalseCrossings()
Returns whether or not to remove false crossings. |
boolean |
getUseTransposition()
Returns whether or not the transposition heuristic should be used. |
byte |
getWeightHeuristic()
Returns the currently set weight heuristic. |
boolean |
isUsingGroups()
Returns whether or not the layerer will preserve the groupings of nodes between each layer. |
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 |
setRemoveFalseCrossings(boolean b)
Specifies whether or not to remove so-called false crossings in an additional phase. |
void |
setUseTransposition(boolean b)
Specifies whether or not an additional crossing minimization heuristic should be used. |
void |
setUsingGroups(boolean usingGroups)
Specifies whether or not the layerer will preserve the groupings of nodes between each layer. |
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 Object GROUP_KEY
public static final byte BARYCENTER_HEURISTIC
public static final byte MEDIAN_HEURISTIC
| Constructor Detail |
|---|
public ClassicLayerSequencer()
| Method Detail |
|---|
public void setUseTransposition(boolean b)
public boolean getUseTransposition()
setUseTransposition(boolean)public void setWeightHeuristic(byte h)
BARYCENTER_HEURISTIC is set.
h - one of BARYCENTER_HEURISTIC and
MEDIAN_HEURISTIC.public byte getWeightHeuristic()
setWeightHeuristic(byte)public void setRemoveFalseCrossings(boolean b)
public boolean getRemoveFalseCrossings()
setRemoveFalseCrossings(boolean)public void setMaximalDuration(long msec)
msec - granted time in millisecondspublic int getRecentCrossingNumber()
getLayers(LayoutGraph, NodeMap, int)
must have been called before.public void adoptValues(LayerSequencer otherSequencer)
public NodeList[] getLayers(LayoutGraph g,
NodeMap layerMap,
int maxLayer)
LayerSequencer
getLayers in interface LayerSequencerg - the graph being acted uponlayerMap - provides for each node an integral number signifying the layer
of that node. The first layer has the number 0.maxLayer - the number of different layers
public boolean isUsingGroups()
Defaults to false.
public void setUsingGroups(boolean usingGroups)
Defaults to false.
public long getMaximalDuration()
public int getRandomizationRounds()
public void setRandomizationRounds(int randomizationRounds)
randomizationRounds - the new number of additional rounds
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||