Packagecom.yworks.yfiles.layout.hierarchic
Classpublic class TopologicalLayerer
InheritanceTopologicalLayerer Inheritance YObject Inheritance Object
Implements OldLayerer, Layerer

This class implements the first phase of the Sugiyama algorithm. It uses topological sorting to assign layers to the nodes.



Public Properties
 PropertyDefined By
  rankingPolicy : int
Getter: Returns the currently active ranking policy within this layerer.
TopologicalLayerer
Public Methods
 MethodDefined By
  
TopologicalLayerer(init:Boolean = true)
TopologicalLayerer
  
TopologicalLayerer
  
assignNodeLayer(g:LayoutGraph, layer:NodeMap, reversedEdges:EdgeList):int
This method assigns the nodes in the graph to layers.
TopologicalLayerer
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
TopologicalLayerer
 Inherited
hashCode():int
YObject
  
[static]
TopologicalLayerer
Protected Methods
 MethodDefined By
  
Initializes this object.
TopologicalLayerer
Public Constants
 ConstantDefined By
  DOWN_SHIFT : int = 1
[static] Ranking policy specifier.
TopologicalLayerer
  NO_RERANKING : int = 0
[static] Ranking policy specifier.
TopologicalLayerer
  TIGHT_TREE : int = 2
[static] Ranking policy specifier.
TopologicalLayerer
Property Detail
rankingPolicyproperty
rankingPolicy:int

Getter: Returns the currently active ranking policy within this layerer.

Setter: Sets the (re)ranking policy used within this layerer. By default NO_RERANKING is set.


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

See also

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

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
assignLayers()method
public function assignLayers(graph:LayoutGraph, layers:Layers, ldp:LayoutDataProvider):void

Parameters

graph:LayoutGraph
 
layers:Layers
 
ldp:LayoutDataProvider

assignNodeLayer()method 
public function assignNodeLayer(g:LayoutGraph, layer:NodeMap, reversedEdges:EdgeList):int

This method assigns the nodes in the graph to layers.

Postcondition Forall (v,w) in E: layer(v) < layer(w)

Parameters

g:LayoutGraph — the graph for which the layers are determined.
 
layer:NodeMap — here the layers are stored
 
reversedEdges:EdgeList — here the edges are stored which had been reversed.

Returns
int — the number of layers
getClass()method 
override public function getClass():Class

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

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

See also

newTopologicalLayerer()method 
public static function newTopologicalLayerer():TopologicalLayerer

Returns
TopologicalLayerer
Constant Detail
DOWN_SHIFTConstant
public static const DOWN_SHIFT:int = 1

Ranking policy specifier. Nodes get re-ranked by an inexpensive downshift rule.

NO_RERANKINGConstant 
public static const NO_RERANKING:int = 0

Ranking policy specifier. Nodes do not get re-ranked after the initial topological layering step.

TIGHT_TREEConstant 
public static const TIGHT_TREE:int = 2

Ranking policy specifier. Nodes get re-ranked by finding a spanning tree that contains only tight (length 1) edges.