Packagecom.yworks.yfiles.layout.hierarchic
Classpublic class ClassicLayerSequencer
InheritanceClassicLayerSequencer Inheritance YObject Inheritance Object
Implements LayerSequencer

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
  maximalDuration : uint
Getter: Returns the proposed maximal duration for the calculation of the sequence.
ClassicLayerSequencer
  randomizationRounds : int
Getter: Returns the number of randomized rounds this algorithm will try if there was no optimal solution.
ClassicLayerSequencer
  recentCrossingNumber : int
[read-only] Returns the number of edge crossings that were produced by this sequencer the last time it was applied to a graph.
ClassicLayerSequencer
  removeFalseCrossings : Boolean
Getter: Returns whether or not to remove false crossings.
ClassicLayerSequencer
  useTransposition : Boolean
Getter: Returns whether or not the transposition heuristic should be used.
ClassicLayerSequencer
  usingGroups : Boolean
Specifies whether or not the layerer will preserve the groupings of nodes between each layer.
ClassicLayerSequencer
  weightHeuristic : int
Getter: Returns the currently set weight heuristic.
ClassicLayerSequencer
Public Methods
 MethodDefined By
  
ClassicLayerSequencer(init:Boolean = true)
Instantiates a new layer sequencer.
ClassicLayerSequencer
  
adoptValues(otherSequencer:LayerSequencer):void
Tries to adopt/copy the settings of the given LayerSequencer to this sequencer.
ClassicLayerSequencer
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
ClassicLayerSequencer
  
getLayers(g:LayoutGraph, layerMap:NodeMap, maxLayer:int):Vector.<Object>
ClassicLayerSequencer
 Inherited
hashCode():int
YObject
  
[static] Instantiates a new layer sequencer.
ClassicLayerSequencer
Protected Methods
 MethodDefined By
  
Initializes this object.
ClassicLayerSequencer
Public Constants
 ConstantDefined By
  BARYCENTER_HEURISTIC : int = 0
[static] Weight assignment heuristic specifier.
ClassicLayerSequencer
  GROUP_KEY : Object = y.layout.hierarchic.ClassicLayerSequencer.GROUP_KEY
[static] This is the key, which must be used to register the DataProvider which contains the mappings between nodes and group ids.
ClassicLayerSequencer
  MEDIAN_HEURISTIC : int = 1
[static] Weight assignment heuristic specifier.
ClassicLayerSequencer
Property Detail
maximalDurationproperty
maximalDuration:uint

Getter: Returns the proposed maximal duration for the calculation of the sequence.

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
recentCrossingNumberproperty 
recentCrossingNumber:int  [read-only]

Returns the number of edge crossings that were produced by this sequencer the last time it was applied to a graph.

Precondition Method getLayers() must have been called before.


Implementation
    public function get recentCrossingNumber():int

See also

removeFalseCrossingsproperty 
removeFalseCrossings:Boolean

Getter: Returns whether or not to remove false crossings.

Setter: Specifies whether or not to remove so-called false crossings in an additional phase. A false crossing is a crossing between two edges that share a common terminal node.

By default this feature is active.


Implementation
    public function get removeFalseCrossings():Boolean
    public function set removeFalseCrossings(value:Boolean):void
useTranspositionproperty 
useTransposition:Boolean

Getter: Returns whether or not the transposition 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 useTransposition():Boolean
    public function set useTransposition(value:Boolean):void
usingGroupsproperty 
usingGroups:Boolean

Specifies whether or not the layerer will preserve the groupings of nodes between each layer. Preserving groupings means nodes having the same integer group number will be placed directly next to each other within each layer.

Defaults to false.


Implementation
    public function get usingGroups():Boolean
    public function set usingGroups(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

See also

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

Instantiates a new layer sequencer.

Parameters
init:Boolean (default = true) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods. This parameter can safely be ignored/omitted when calling the constructor.
Method Detail
adoptValues()method
public function adoptValues(otherSequencer:LayerSequencer):void

Tries to adopt/copy the settings of the given LayerSequencer to this sequencer.

Parameters

otherSequencer:LayerSequencer

getClass()method 
override public function getClass():Class

Returns
Class
getLayers()method 
public function getLayers(g:LayoutGraph, layerMap:NodeMap, maxLayer:int):Vector.<Object>

Parameters

g:LayoutGraph
 
layerMap:NodeMap
 
maxLayer:int

Returns
Vector.<Object>
initClassicLayerSequencer()method 
protected final function initClassicLayerSequencer():void

Initializes this object. See the documentation of the corresponding factory method newClassicLayerSequencer() for details.

See also

newClassicLayerSequencer()method 
public static function newClassicLayerSequencer():ClassicLayerSequencer

Instantiates a new layer sequencer.

Returns
ClassicLayerSequencer
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.

GROUP_KEYConstant 
public static const GROUP_KEY:Object = y.layout.hierarchic.ClassicLayerSequencer.GROUP_KEY

This is the key, which must be used to register the DataProvider which contains the mappings between nodes and group ids. Group ids are integer objects, containing unique group numbers or null, if the node belongs to no specific group.

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.