|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--y.layout.hierarchic.ClassicLayerSequencer
This class implements the second phase of the sugiyama algorithm. It minimizes the crossings in the diagram by using either the barycentric, 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()
Getter for property usingGroups. |
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)
Whether or not to remove so-called false crossings in an additional phase. |
void |
setUseTransposition(boolean b)
Whether or not an additional crossing minimization heuristic should be used. |
void |
setUsingGroups(boolean usingGroups)
Setter for property usingGroups. |
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)
By default the transposition rule is active.
public boolean getUseTransposition()
ClassicLayerSequencer.setUseTransposition(boolean)public void setWeightHeuristic(byte h)
ClassicLayerSequencer.BARYCENTER_HEURISTIC is set.
h - one of ClassicLayerSequencer.BARYCENTER_HEURISTIC and
ClassicLayerSequencer.MEDIAN_HEURISTIC.public byte getWeightHeuristic()
ClassicLayerSequencer.setWeightHeuristic(byte)public void setRemoveFalseCrossings(boolean b)
By default this feature is active.
public boolean getRemoveFalseCrossings()
ClassicLayerSequencer.setRemoveFalseCrossings(boolean)public void setMaximalDuration(long msec)
msec - granted time in millisecondspublic int getRecentCrossingNumber()
Precondition: Method ClassicLayerSequencer.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 diferent layers
public boolean isUsingGroups()
public void setUsingGroups(boolean usingGroups)
usingGroups - New value of property usingGroups.public long getMaximalDuration()
public int getRandomizationRounds()
public void setRandomizationRounds(int randomizationRounds)
randomizationRounds - the new number of additional rounds
|
© 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 | |||||||||