Packagecom.yworks.yfiles.layout.hierarchic.incremental
Classpublic class DefaultLayerSequencer
InheritanceDefaultLayerSequencer Inheritance YObject Inheritance Object
Implements Sequencer

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.



Public Properties
 PropertyDefined By
  groupTranspositionEnabled : Boolean
Getter: Returns whether or not the group transposition heuristic should be used.
DefaultLayerSequencer
  maximalDuration : uint
Getter: Returns the proposed maximal duration for the calculation of the sequence.
DefaultLayerSequencer
  randomizationRounds : int
Getter: Returns the number of randomized rounds this algorithm will try if there was no optimal solution.
DefaultLayerSequencer
  transpositionEnabled : Boolean
Getter: Returns whether or not the transposition crossing minimization heuristic should be used.
DefaultLayerSequencer
  weightHeuristic : int
Getter: Returns the currently set weight heuristic.
DefaultLayerSequencer
Public Methods
 MethodDefined By
  
DefaultLayerSequencer(init:Boolean = true)
DefaultLayerSequencer
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
DefaultLayerSequencer
 Inherited
hashCode():int
YObject
  
[static]
DefaultLayerSequencer
  
sequenceNodeLayers(graph:LayoutGraph, glayers:Layers, ldp:LayoutDataProvider, itemFactory:ItemFactory):void
DefaultLayerSequencer
Protected Methods
 MethodDefined By
  
DefaultLayerSequencer
Public Constants
 ConstantDefined By
  BARYCENTER_HEURISTIC : int = 0
[static] Weight assignment heuristic specifier.
DefaultLayerSequencer
  MEDIAN_HEURISTIC : int = 1
[static] Weight assignment heuristic specifier.
DefaultLayerSequencer
Property Detail
groupTranspositionEnabledproperty
groupTranspositionEnabled:Boolean

Getter: Returns whether or not the group transposition heuristic should be used.

Setter: Specifies whether or not an additional crossing minimization heuristic should be used in the presence of grouped graphs. Activating this heuristic can reduce the overall number of edge crossings in grouped graphs. On the other hand its activation increases running time.

By default the transposition rule is not active.


Implementation
    public function get groupTranspositionEnabled():Boolean
    public function set groupTranspositionEnabled(value:Boolean):void
maximalDurationproperty 
maximalDuration:uint

Getter: Returns the proposed maximal duration for the calculation of the sequence. The default is 10000

Setter: Sets the maximum amount of time granted for this sequencer per execution.


Implementation
    public function get maximalDuration():uint
    public function set maximalDuration(value:uint):void
randomizationRoundsproperty 
randomizationRounds:int

Getter: Returns the number of randomized rounds this algorithm will try if there was no optimal solution.

Setter: 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.


Implementation
    public function get randomizationRounds():int
    public function set randomizationRounds(value:int):void
transpositionEnabledproperty 
transpositionEnabled:Boolean

Getter: Returns whether or not the transposition crossing minimization heuristic should be used.

Setter: Specifies whether or not an additional crossing minimization heuristic should be used. Activating this heuristic can reduce the overall number of edge crossings. On the other hand its activation increases running time.

By default the transposition rule is active.


Implementation
    public function get transpositionEnabled():Boolean
    public function set transpositionEnabled(value:Boolean):void
weightHeuristicproperty 
weightHeuristic:int

Getter: Returns the currently set weight heuristic.

Setter: Sets the weight heuristic to be used. By default BARYCENTER_HEURISTIC is set.


Implementation
    public function get weightHeuristic():int
    public function set weightHeuristic(value:int):void

Throws
IllegalArgumentException — if the constant is unknown

See also

Constructor Detail
DefaultLayerSequencer()Constructor
public function DefaultLayerSequencer(init:Boolean = true)



Parameters
init:Boolean (default = true)
Method Detail
getClass()method
override public function getClass():Class

Returns
Class
initDefaultLayerSequencer()method 
protected final function initDefaultLayerSequencer():void

newDefaultLayerSequencer()method 
public static function newDefaultLayerSequencer():DefaultLayerSequencer

Returns
DefaultLayerSequencer
sequenceNodeLayers()method 
public function sequenceNodeLayers(graph:LayoutGraph, glayers:Layers, ldp:LayoutDataProvider, itemFactory:ItemFactory):void

Parameters

graph:LayoutGraph
 
glayers:Layers
 
ldp:LayoutDataProvider
 
itemFactory:ItemFactory

Constant Detail
BARYCENTER_HEURISTICConstant
public static const BARYCENTER_HEURISTIC:int = 0

Weight assignment heuristic specifier. A node position within a layer will be determined by the barycenter of its successor (downward pass) and predecessor (upward pass) nodes.

MEDIAN_HEURISTICConstant 
public static const MEDIAN_HEURISTIC:int = 1

Weight assignment heuristic specifier. A node position within a layer will be determined by the median position of its successor (downward pass) and predecessor (upward pass) nodes.