Packagecom.yworks.yfiles.layout.router
Classpublic class PatchRouterStage
InheritancePatchRouterStage Inheritance AbstractLayoutStage Inheritance YObject Inheritance Object

Performance optimization stage for com.yworks.yfiles.layout.router.OrthogonalEdgeRouter. This layout stage decomposes the input graph for the orthogonal edge router into several smaller graphs on each of which the edge router will perform its action separately, hence speeding up execution time and reducing peak memory consumption.

See also

com.yworks.yfiles.layout.router.OrthogonalEdgeRouter


Public Properties
 PropertyDefined By
  activationThreshold : int
Specifies the activation threshold for this class.
PatchRouterStage
 InheritedcoreLayouter : Layouter
Specifies the core layouter.
AbstractLayoutStage
Public Methods
 MethodDefined By
  
PatchRouterStage(coreLayouter:Layouter, init:Boolean = true)
Creates a new instance of PatchRouterStage.
PatchRouterStage
  
canLayout(graph:LayoutGraph):Boolean
[override]
PatchRouterStage
  
doLayout(graph:LayoutGraph):void
[override] Assigns orthogonal edge paths to the edges of a big graph, efficiently.
PatchRouterStage
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
PatchRouterStage
 Inherited
hashCode():int
YObject
  
[static] Creates a new instance of PatchRouterStage.
PatchRouterStage
Protected Methods
 MethodDefined By
 Inherited
canLayoutCore(graph:LayoutGraph):Boolean
Queries the core layouter whether or not the given graph can be laid out.
AbstractLayoutStage
 Inherited
Invokes the layout routine of the core layouter.
AbstractLayoutStage
 Inherited
AbstractLayoutStage
 Inherited
AbstractLayoutStage
  
initPatchRouterStage(coreLayouter:Layouter):void
Initializes this object.
PatchRouterStage
Property Detail
activationThresholdproperty
activationThreshold:int

Specifies the activation threshold for this class. The patch router will perform its optimization step only if the sum of the edges and nodes of the input graph is bigger than the activation threshold. By default the threshold value is set to 1000.


Implementation
    public function get activationThreshold():int
    public function set activationThreshold(value:int):void
Constructor Detail
PatchRouterStage()Constructor
public function PatchRouterStage(coreLayouter:Layouter, init:Boolean = true)

Creates a new instance of PatchRouterStage.

Parameters
coreLayouter:Layouter — the core layouter invoked by this stage. The coreLayouter must contain an instance of com.yworks.yfiles.layout.router.OrthogonalEdgeRouter its layout pipeline.
 
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.

See also

Method Detail
canLayout()method
override public function canLayout(graph:LayoutGraph):Boolean

Parameters

graph:LayoutGraph

Returns
Boolean
doLayout()method 
override public function doLayout(graph:LayoutGraph):void

Assigns orthogonal edge paths to the edges of a big graph, efficiently. Note that this stage will only have an optimizing effect if the graph is bigger than the activation threshold and the sphere of action of the core router includes all edges.

Precondition a LayoutStage of getCoreLayouter() must be an instance of OrthogonalEdgeRouter.

Parameters

graph:LayoutGraph

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

Returns
Class
initPatchRouterStage()method 
protected final function initPatchRouterStage(coreLayouter:Layouter):void

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

Parameters

coreLayouter:Layouter

See also

newPatchRouterStage()method 
public static function newPatchRouterStage(coreLayouter:Layouter):PatchRouterStage

Creates a new instance of PatchRouterStage.

Parameters

coreLayouter:Layouter — the core layouter invoked by this stage. The coreLayouter must contain an instance of com.yworks.yfiles.layout.router.OrthogonalEdgeRouter its layout pipeline.

Returns
PatchRouterStage

See also