Packagecom.yworks.yfiles.layout.planar
Classpublic class SimpleEdgeRouter
InheritanceSimpleEdgeRouter Inheritance YObject Inheritance Object

Instances of this class route edges through a planar graph using its dual graph.



Public Properties
 PropertyDefined By
  edgeWeight : EdgeMap
[write-only]
SimpleEdgeRouter
Public Methods
 MethodDefined By
  
SimpleEdgeRouter(_planar:PlanarInformation, init:Boolean = true)
SimpleEdgeRouter
  
dijkstra(graph:Graph, s:Node, t:Node, directed:Boolean, cost:Vector.<int>, dist:Vector.<int>, pred:Vector.<Object>):void
SimpleEdgeRouter
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
SimpleEdgeRouter
 Inherited
hashCode():int
YObject
  
insertEdge(currentEdge:Edge):void
Inserts a single edge into the graph by routing through the dual graph.
SimpleEdgeRouter
  
insertEdges(edges:EdgeList):void
Inserts a list of edges into the graph by routing through the dual graph.
SimpleEdgeRouter
  
SimpleEdgeRouter
  
[static]
SimpleEdgeRouter
  
Tries to find better paths for all edges that caused crossings.
SimpleEdgeRouter
  
Tries to find better paths for all edges that caused crossings.
SimpleEdgeRouter
Protected Methods
 MethodDefined By
  
Initializes this object.
SimpleEdgeRouter
  
routeEdge(e:Edge, _pathStyle:int, dualPlanar:DualPlanarInformation, zeroEdges:Vector.<Object>):EdgeList
This method tries to find the best route through a graph.
SimpleEdgeRouter
Public Constants
 ConstantDefined By
  DUAL : int = 0
[static]
SimpleEdgeRouter
  REAL : int = 1
[static]
SimpleEdgeRouter
Property Detail
edgeWeightproperty
edgeWeight:EdgeMap  [write-only]


Implementation
    public function set edgeWeight(value:EdgeMap):void
Constructor Detail
SimpleEdgeRouter()Constructor
public function SimpleEdgeRouter(_planar:PlanarInformation, init:Boolean = true)

Parameters
_planar:PlanarInformation
 
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
dijkstra()method
public function dijkstra(graph:Graph, s:Node, t:Node, directed:Boolean, cost:Vector.<int>, dist:Vector.<int>, pred:Vector.<Object>):void

Parameters

graph:Graph
 
s:Node
 
t:Node
 
directed:Boolean
 
cost:Vector.<int>
 
dist:Vector.<int>
 
pred:Vector.<Object>

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

Returns
Class
initSimpleEdgeRouter()method 
protected final function initSimpleEdgeRouter(_planar:PlanarInformation):void

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

Parameters

_planar:PlanarInformation

See also

insertEdge()method 
public function insertEdge(currentEdge:Edge):void

Inserts a single edge into the graph by routing through the dual graph.

Parameters

currentEdge:Edge — the edge to be routed.

insertEdges()method 
public function insertEdges(edges:EdgeList):void

Inserts a list of edges into the graph by routing through the dual graph.

Parameters

edges:EdgeList — the edges to be routed routed.

insertEdgesVirtual()method 
public function insertEdgesVirtual(edges:EdgeList):int

Parameters

edges:EdgeList

Returns
int
newSimpleEdgeRouter()method 
public static function newSimpleEdgeRouter(_planar:PlanarInformation):SimpleEdgeRouter

Parameters

_planar:PlanarInformation

Returns
SimpleEdgeRouter
rerouteEdges()method 
public function rerouteEdges(edges:EdgeList):void

Tries to find better paths for all edges that caused crossings.

Parameters

edges:EdgeList

rerouteEdgesWithMaxIterations()method 
public function rerouteEdgesWithMaxIterations(iter:int, edges:EdgeList):void

Tries to find better paths for all edges that caused crossings.

Precondition is a valid dual graph

Parameters

iter:int — number of iterations to perform. A value less or equal to zero causes the method to run until the best possible result is found.
 
edges:EdgeList

routeEdge()method 
protected function routeEdge(e:Edge, _pathStyle:int, dualPlanar:DualPlanarInformation, zeroEdges:Vector.<Object>):EdgeList

This method tries to find the best route through a graph. Best means that the route causes as less crossings as possible.

Precondition a valid dual graph, dsp must be initialized

Parameters

e:Edge — the edge to be routed
 
_pathStyle:int
 
dualPlanar:DualPlanarInformation
 
zeroEdges:Vector.<Object>

Returns
EdgeList — the path through the dual graph that yielded the best result
Constant Detail
DUALConstant
public static const DUAL:int = 0

REALConstant 
public static const REAL:int = 1