Packagecom.yworks.yfiles.layout.planar
Classpublic class GT
InheritanceGT Inheritance YObject Inheritance Object
Implements InitialPlanarSubgraph

This class implements a powerful planar-subgraph heuristic. The heuristic is an extension of the Goldschmidt/Takvorian Algorithm which is described in Eiglsperger/Kaufmann.



Public Properties
 PropertyDefined By
  allowRandomization : Boolean
Specifies if the algorithm will use randomization to improve the result.
GT
  hiddenEdges : EdgeList
[read-only] Returns a list of the edges that have been removed in order to gain a planarization of the input graph.
GT
  iterations : int
Specifies number of iterations when randomization is used.
GT
  sink : Node
[read-only] Returns the sink of the st-graph.
GT
  source : Node
[read-only] Returns the source of the st-graph.
GT
Protected Properties
 PropertyDefined By
  edgeListComparator : GT_EdgeListComparator
GT
  globalSink : Node
GT
  globalSource : Node
GT
  graph : Graph
GT
  _hiddenEdges : EdgeList
GT
  isValid : Boolean
GT
  mis1Comparator : GT_MIS1Comparator
GT
  mis2Comparator : GT_MIS2Comparator
GT
  outerFaceDeterminationEdge : Edge
GT
  outerFaceDeterminationNode : Node
GT
  planar : PlanarInformation
GT
  vertexOrder : VertexOrder
GT
  weight : EdgeMap
GT
Public Methods
 MethodDefined By
  
GT(init:Boolean = true)
Returns a new instance of GT.
GT
  
This method planarizes a graph by finding (a maximum) planar sub- graph.
GT
  
dispose():void
Cleaning up resources.
GT
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
GT
 Inherited
hashCode():int
YObject
  
[static] Returns a new instance of GT.
GT
Protected Methods
 MethodDefined By
  
calcMISIncidents(MIS:EdgeList, MISIncidents:NodeMap):void
Calculates form the independent set of edges, the edges incident to an node which are inside this independent set.
GT
  
calcOrdering(orderNumbers:Vector.<int>, mis:OverlapGraphMIS):NodeList
GT
  
createCircularEdgeOrder(MIS1:EdgeList, MIS2:EdgeList, downwardLink:NodeMap, upwardLink:NodeMap, orderNumbers:Vector.<int>):void
this method sorts each nodes incident edges according to the aim of yielding a planar embedding for a subgraph of the input graph It also assigns first incoming/outgoing.
GT
  
GT
  
initGT():void
Initializes this object.
GT
  
initOrdering(downwardLink:NodeMap, upwardLink:NodeMap, orderedNodes:NodeList):void
Initializes data structures from an ordering.
GT
  
GT
  
showGraphicDebug(MIS1:EdgeList, MIS2:EdgeList, orderNumbers:Vector.<int>):void
GT
  
showIncidentEdges(MIS1Incidents:NodeMap, MIS2Incidents:NodeMap, downwardLink:EdgeMap, upwardLink:EdgeMap):void
GT
  
showVertexOrder(orderNumbers:Vector.<int>):void
GT
Property Detail
_hiddenEdgesproperty
protected var _hiddenEdges:EdgeList

allowRandomizationproperty 
allowRandomization:Boolean

Specifies if the algorithm will use randomization to improve the result.


Implementation
    public function get allowRandomization():Boolean
    public function set allowRandomization(value:Boolean):void
edgeListComparatorproperty 
protected var edgeListComparator:GT_EdgeListComparator

globalSinkproperty 
protected var globalSink:Node

globalSourceproperty 
protected var globalSource:Node

graphproperty 
protected var graph:Graph

hiddenEdgesproperty 
hiddenEdges:EdgeList  [read-only]

Returns a list of the edges that have been removed in order to gain a planarization of the input graph. The createPlanarization method of this class must have been called earlier to compute the list of hidden edges. If not so, a runtime exception is thrown!


Implementation
    public function get hiddenEdges():EdgeList

Throws
Error — if createPlanarization has not been called prior to calling this method.

See also

isValidproperty 
protected var isValid:Boolean

iterationsproperty 
iterations:int

Specifies number of iterations when randomization is used.


Implementation
    public function get iterations():int
    public function set iterations(value:int):void
mis1Comparatorproperty 
protected var mis1Comparator:GT_MIS1Comparator

mis2Comparatorproperty 
protected var mis2Comparator:GT_MIS2Comparator

outerFaceDeterminationEdgeproperty 
protected var outerFaceDeterminationEdge:Edge

outerFaceDeterminationNodeproperty 
protected var outerFaceDeterminationNode:Node

planarproperty 
protected var planar:PlanarInformation

sinkproperty 
sink:Node  [read-only]

Returns the sink of the st-graph.


Implementation
    public function get sink():Node
sourceproperty 
source:Node  [read-only]

Returns the source of the st-graph.


Implementation
    public function get source():Node
vertexOrderproperty 
protected var vertexOrder:VertexOrder

weightproperty 
protected var weight:EdgeMap

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

Returns a new instance of GT.

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
calcMISIncidents()method
protected function calcMISIncidents(MIS:EdgeList, MISIncidents:NodeMap):void

Calculates form the independent set of edges, the edges incident to an node which are inside this independent set.

Parameters

MIS:EdgeList
 
MISIncidents:NodeMap

calcOrdering()method 
protected function calcOrdering(orderNumbers:Vector.<int>, mis:OverlapGraphMIS):NodeList

Parameters

orderNumbers:Vector.<int>
 
mis:OverlapGraphMIS

Returns
NodeList
createCircularEdgeOrder()method 
protected function createCircularEdgeOrder(MIS1:EdgeList, MIS2:EdgeList, downwardLink:NodeMap, upwardLink:NodeMap, orderNumbers:Vector.<int>):void

this method sorts each nodes incident edges according to the aim of yielding a planar embedding for a subgraph of the input graph It also assigns first incoming/outgoing.

Parameters

MIS1:EdgeList
 
MIS2:EdgeList
 
downwardLink:NodeMap
 
upwardLink:NodeMap
 
orderNumbers:Vector.<int>

createPlanarization()method 
public function createPlanarization(p:PlanarInformation):void

This method planarizes a graph by finding (a maximum) planar sub- graph. To gain a planar graph, sometimes some edges have to be removed in order to prevent crossings. The removed edges are returned by the method getHiddenEdges() below. A circular edge order is also computed. Note: the input graph is modified

Parameters

p:PlanarInformation — the PlanarInformation object associated with the input graph

createReverseEdges()method 
protected function createReverseEdges():void

dispose()method 
public function dispose():void

Cleaning up resources.

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

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

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

See also

initOrdering()method 
protected function initOrdering(downwardLink:NodeMap, upwardLink:NodeMap, orderedNodes:NodeList):void

Initializes data structures from an ordering.

Parameters

downwardLink:NodeMap
 
upwardLink:NodeMap
 
orderedNodes:NodeList

newGT()method 
public static function newGT():GT

Returns a new instance of GT.

Returns
GT
showEdgePartitionResult()method 
protected function showEdgePartitionResult(MIS1:ArrayList, MIS2:ArrayList):void

Parameters

MIS1:ArrayList
 
MIS2:ArrayList

showGraphicDebug()method 
protected function showGraphicDebug(MIS1:EdgeList, MIS2:EdgeList, orderNumbers:Vector.<int>):void

Parameters

MIS1:EdgeList
 
MIS2:EdgeList
 
orderNumbers:Vector.<int>

showIncidentEdges()method 
protected function showIncidentEdges(MIS1Incidents:NodeMap, MIS2Incidents:NodeMap, downwardLink:EdgeMap, upwardLink:EdgeMap):void

Parameters

MIS1Incidents:NodeMap
 
MIS2Incidents:NodeMap
 
downwardLink:EdgeMap
 
upwardLink:EdgeMap

showVertexOrder()method 
protected function showVertexOrder(orderNumbers:Vector.<int>):void

Parameters

orderNumbers:Vector.<int>