Packagecom.yworks.yfiles.layout.planar
Classpublic class PlanarInformation
InheritancePlanarInformation Inheritance SimplePlanarInformation Inheritance YObject Inheritance Object

This class defines a planar graph. It manages the faces and reverse edges of a planar graph. The edges adjacent to a node are supposed to be ordered clockwise.



Public Properties
 PropertyDefined By
 InheritedfaceList : YList
SimplePlanarInformation
 Inheritedgraph : Graph
[read-only] Returns the graph for which this planar information is kept.
SimplePlanarInformation
 InheritedouterFace : Face
Getter: Returns the outer face of the planar graph Setter: Sets the outer(unbound,exterior) face of the planar graph.
SimplePlanarInformation
 InheritedouterFaceSetCorrectly : Boolean
[read-only] Returns if the current planar embedding has a correctly set outer face.
SimplePlanarInformation
 Inheritedplanar : Boolean
[read-only] Returns if the current embedding defined by the faces is planar.
SimplePlanarInformation
Protected Properties
 PropertyDefined By
 Inherited_graph : Graph
SimplePlanarInformation
 Inherited_outerFace : Face
SimplePlanarInformation
Public Methods
 MethodDefined By
  
PlanarInformation(graph:Graph, init:Boolean = true)
Returns a new instance of Planar Information for a graph.
PlanarInformation
  
PlanarInformation
  
This method updates the faces of the graph when an edge is inserted which connects two different connected components.
PlanarInformation
  
bridgeFaceAt(e:Edge, _start:Edge, _stop:Edge):Face
This method updates the faces of the graph when an edge is inserted which connects two different connected components.
PlanarInformation
 Inherited
calcFaces():void
Calculates the faces of the graph from a given edge order.
SimplePlanarInformation
 Inherited
Calculates the faces of the graph from the cyclic order of the edges around their source nodes.
SimplePlanarInformation
 Inherited
Calculates the cyclic order of the edges around their source nodes from the set of faces of the graph.
SimplePlanarInformation
  
Verifies if the edge recovery information is consistent.
PlanarInformation
  
Returns the number of dummy nodes currently contained in the graph
PlanarInformation
 Inherited
createFace(edge:Edge, edgeOrder:EdgeOrder, mark:Vector.<Boolean>):Face
Creates a face starting at an edge and using the cyclic order of the outgoing edges.
SimplePlanarInformation
 Inherited
Creates a FaceMap for the faces in the graph.
SimplePlanarInformation
 Inherited
Creates the reverse edge for a given edge.
SimplePlanarInformation
 Inherited
Returns the counterclockwise next edge of an edge at the source node.
SimplePlanarInformation
 Inherited
Returns the counterclockwise preceding edge of an edge at the source node.
SimplePlanarInformation
  
dispose():void
[override] Remove all information from graph concerning planar Information: reverse Edge-Key,inserted reverse edges Note: don't use the PlanarInformation after disposal!
PlanarInformation
 Inherited
Disposes a FaceMap formerly created with createFaceMap().
SimplePlanarInformation
  
this method restores all the substituted edges in the graph and removes the dummy nodes that represent crossings
PlanarInformation
  
Removes a list of edges from the graph.
PlanarInformation
 Inherited
equals(o:Object):Boolean
YObject
 Inherited
faceCount():int
Returns the number of Faces.
SimplePlanarInformation
 Inherited
Get the face to which an edge belongs.
SimplePlanarInformation
 Inherited
Get cursor over faces.
SimplePlanarInformation
  
getClass():Class
[override]
PlanarInformation
  
This method returns the path generated by split operations on one edge.
PlanarInformation
 Inherited
Returns the reverse edge of an edge.
SimplePlanarInformation
  
getType(node:Node):int
Returns the type of a node.
PlanarInformation
  
This method returns the original edge for a split edge.
PlanarInformation
 Inherited
hashCode():int
YObject
  
insertNodeWithEdge(edge:Edge, node:Node, face:Face):void
Insert a node with one edge into a face.
PlanarInformation
  
isBend(node:Node):Boolean
Returns if a node is a dummy node representing a bend.
PlanarInformation
  
isCrossing(node:Node):Boolean
Returns if a node is a dummy node representing a crossing.
PlanarInformation
 Inherited
isInsertedEdge(edge:Edge):Boolean
Returns if an edge is inserted in the planarization process or is an original edge of the input graph
SimplePlanarInformation
  
isVertex(node:Node):Boolean
Returns if a node is a real node and no dummy node.
PlanarInformation
  
markAsBend(node:Node):void
Sets, that a node should be handled like a dummy node representing a bend.
PlanarInformation
  
markAsCrossing(node:Node):void
Marks a vertex as crossing.
PlanarInformation
 Inherited
Marks an edge as inserted by an planarization process.
SimplePlanarInformation
  
Marks an edge as original
PlanarInformation
  
markAsVertex(node:Node):void
Sets, that a node should be handled like a real node in a graph.
PlanarInformation
  
[static] Returns a new instance of Planar Information for a graph.
PlanarInformation
 Inherited
[static] Returns a new instance of Planar Information for a graph.
SimplePlanarInformation
  
PlanarInformation
 Inherited
setFaceOf(edge:Edge, face:Face):void
Sets to which face an edge belongs.
SimplePlanarInformation
 Inherited
setIsInsertedEdge(edge:Edge, value:Boolean):void
Sets if an edge had been inserted in the planarization process.
SimplePlanarInformation
 Inherited
setReverse(e1:Edge, e2:Edge):void
Set two edges as reverse to each other.
SimplePlanarInformation
  
setType(node:Node, type:int):void
Sets the type for a node.
PlanarInformation
 Inherited
Prints circular edge order on output.
SimplePlanarInformation
  
showEdgeRecoveryInfo(verbose:Boolean):void
this method shows all edges being split to planarize the graph and what has become of them (a list of subedges).
PlanarInformation
 Inherited
showFaces():void
Prints faces on output.
SimplePlanarInformation
  
splitFace(_face:Face, _edge:Edge):Vector.<Object>
Splits a face into two parts by introducing an edge.
PlanarInformation
  
splitFaceAt(_face:Face, _e:Edge, _start:Edge, _stop:Edge):Vector.<Object>
Splits a face into two parts by introducing an edge.
PlanarInformation
  
splitFaceWithSelfLoop(faceEdge:Edge, selfLoop:Edge):void
Inserts one self-loop into an existing face.
PlanarInformation
  
Splits an edge into two parts by introducing a dummy node.
PlanarInformation
  
Splits an edge into two parts by introducing a dummy node.
PlanarInformation
 Inherited
toString():String
Returns a String of the list of faces
SimplePlanarInformation
  
this method unifies two faces separated by a single edge.
PlanarInformation
  
reconstruct the edge that was subdivided to gain the dummy node given as the parameter.
PlanarInformation
  
updateEdgeRecoveryInfo(e:Edge, segments:EdgeList, spec:int):void
this method collects bookkeeping information for consistent recovery.
PlanarInformation
Protected Methods
 MethodDefined By
  
Factory to create edge tuples.
PlanarInformation
  
Factory to create edge tuples.
PlanarInformation
  
[override] Factory to create edge tuples.
PlanarInformation
  
fireSplitFaceEvent(e:Edge, oldFaces:Vector.<Object>, newFaces:Vector.<Object>):void
PlanarInformation
  
fireSubdivisionEvent(e:Edge, result:Vector.<Object>):void
PlanarInformation
  
fireUnsplitFaceEvent(e:Edge, oldFaces:Vector.<Object>, newFaces:Vector.<Object>):void
PlanarInformation
  
fireUnsubdivideEvent(splitEdges:Vector.<Object>, resultingEdge:Edge):void
PlanarInformation
 Inherited
Returns the counterclockwise next edge of another edge around a node
SimplePlanarInformation
  
Returns the information for an edge.
PlanarInformation
  
Returns the information for an edge.
PlanarInformation
 Inherited
Returns the information for an edge.
SimplePlanarInformation
  
Initializes this object.
PlanarInformation
 Inherited
Initializes this object.
SimplePlanarInformation
Public Constants
 ConstantDefined By
  SPLIT : int = 0
[static]
PlanarInformation
  UNIFY : int = 1
[static]
PlanarInformation
Constructor Detail
PlanarInformation()Constructor
public function PlanarInformation(graph:Graph, init:Boolean = true)

Returns a new instance of Planar Information for a graph.

Parameters
graph:Graph — The graph for which the planarity information is kept.
 
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
addSubdivisionHandler()method
public function addSubdivisionHandler(handler:SubdivisionHandler):void

Parameters

handler:SubdivisionHandler

bridgeFace()method 
public function bridgeFace(e:Edge):Face

This method updates the faces of the graph when an edge is inserted which connects two different connected components. The reverse edge is created.

Parameters

e:Edge — edge that connects two connected components.

Returns
Face
bridgeFaceAt()method 
public function bridgeFaceAt(e:Edge, _start:Edge, _stop:Edge):Face

This method updates the faces of the graph when an edge is inserted which connects two different connected components. The reverse edge is created.

Parameters

e:Edge — edge that connects two connected components.
 
_start:Edge — the predecessor of e in the cyclic ordering on the source node of e, or null, if no specific predecessor is wanted.
 
_stop:Edge

Returns
Face
checkEdgeRecovery()method 
public function checkEdgeRecovery():void

Verifies if the edge recovery information is consistent. This method throws a runtime-exception if the edge recovery information is not consistent.

countCrossings()method 
public function countCrossings():int

Returns the number of dummy nodes currently contained in the graph

Returns
int — int number of dummy nodes in the graph
createEdgeInfo()method 
protected function createEdgeInfo():PlanarInformation_EdgeInfo

Factory to create edge tuples.

Returns
PlanarInformation_EdgeInfo
createNodeInfo()method 
protected function createNodeInfo():PlanarInformation_NodeInfo

Factory to create edge tuples.

Returns
PlanarInformation_NodeInfo
createSimpleEdgeInfo()method 
override protected function createSimpleEdgeInfo():SimplePlanarInformation_SimpleEdgeInfo

Factory to create edge tuples.

Returns
SimplePlanarInformation_SimpleEdgeInfo
dispose()method 
override public function dispose():void

Remove all information from graph concerning planar Information: reverse Edge-Key,inserted reverse edges

Note: don't use the PlanarInformation after disposal!

doEdgeRecovery()method 
public function doEdgeRecovery():void

this method restores all the substituted edges in the graph and removes the dummy nodes that represent crossings

doRemoveOriginalEdges()method 
public function doRemoveOriginalEdges(_el:EdgeList):void

Removes a list of edges from the graph. The edges may have been split by the subdivideEdge method. In this case the edges resulting from the subdivide operation are removed.

Parameters

_el:EdgeList — the list of edges which should be removed.

fireSplitFaceEvent()method 
protected function fireSplitFaceEvent(e:Edge, oldFaces:Vector.<Object>, newFaces:Vector.<Object>):void

Parameters

e:Edge
 
oldFaces:Vector.<Object>
 
newFaces:Vector.<Object>

fireSubdivisionEvent()method 
protected function fireSubdivisionEvent(e:Edge, result:Vector.<Object>):void

Parameters

e:Edge
 
result:Vector.<Object>

fireUnsplitFaceEvent()method 
protected function fireUnsplitFaceEvent(e:Edge, oldFaces:Vector.<Object>, newFaces:Vector.<Object>):void

Parameters

e:Edge
 
oldFaces:Vector.<Object>
 
newFaces:Vector.<Object>

fireUnsubdivideEvent()method 
protected function fireUnsubdivideEvent(splitEdges:Vector.<Object>, resultingEdge:Edge):void

Parameters

splitEdges:Vector.<Object>
 
resultingEdge:Edge

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

Returns
Class
getCurrentPath()method 
public function getCurrentPath(edge:Edge):EdgeCursor

This method returns the path generated by split operations on one edge. If there were no split operations, just return the edge.

Parameters

edge:Edge — an edge currently in the graph, or which has been in the graph and has been split.

Returns
EdgeCursor
getEdgeInfo()method 
protected function getEdgeInfo(edge:Edge):PlanarInformation_EdgeInfo

Returns the information for an edge.

Parameters

edge:Edge

Returns
PlanarInformation_EdgeInfo
getNodeInfo()method 
protected function getNodeInfo(node:Node):PlanarInformation_NodeInfo

Returns the information for an edge.

Parameters

node:Node

Returns
PlanarInformation_NodeInfo
getType()method 
public function getType(node:Node):int

Returns the type of a node.

Parameters

node:Node — a node in the graph.

Returns
int — the type marker for the node.
getUnsplitEdge()method 
public function getUnsplitEdge(edge:Edge):Edge

This method returns the original edge for a split edge. If the edges was not split, the edge itself is returned.

Parameters

edge:Edge

Returns
Edge
initPlanarInformation()method 
protected final function initPlanarInformation(graph:Graph):void

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

Parameters

graph:Graph

See also

insertNodeWithEdge()method 
public function insertNodeWithEdge(edge:Edge, node:Node, face:Face):void

Insert a node with one edge into a face. The reverse edge is created.

Parameters

edge:Edge — the edge to be inserted with the node
 
node:Node — the node that is inserted
 
face:Face — the face in which the node is inserted

isBend()method 
public function isBend(node:Node):Boolean

Returns if a node is a dummy node representing a bend.

Parameters

node:Node

Returns
Boolean
isCrossing()method 
public function isCrossing(node:Node):Boolean

Returns if a node is a dummy node representing a crossing.

Parameters

node:Node — a node in the embedding

Returns
Boolean — boolean value indicating if the node is a crossing or not
isVertex()method 
public function isVertex(node:Node):Boolean

Returns if a node is a real node and no dummy node.

Parameters

node:Node

Returns
Boolean
markAsBend()method 
public function markAsBend(node:Node):void

Sets, that a node should be handled like a dummy node representing a bend.

Parameters

node:Node

markAsCrossing()method 
public function markAsCrossing(node:Node):void

Marks a vertex as crossing.

Parameters

node:Node — The dummy node that represents a crossing

markAsOriginalEdge()method 
public function markAsOriginalEdge(edge:Edge):void

Marks an edge as original

Parameters

edge:Edge — an edge that is as it was on insertion (not a segment of a split edge.

markAsVertex()method 
public function markAsVertex(node:Node):void

Sets, that a node should be handled like a real node in a graph.

Parameters

node:Node

newPlanarInformation()method 
public static function newPlanarInformation(graph:Graph):PlanarInformation

Returns a new instance of Planar Information for a graph.

Parameters

graph:Graph — The graph for which the planarity information is kept.

Returns
PlanarInformation
removeSubdivisionHandler()method 
public function removeSubdivisionHandler(handler:SubdivisionHandler):void

Parameters

handler:SubdivisionHandler

setType()method 
public function setType(node:Node, type:int):void

Sets the type for a node.

Parameters

node:Node — a node in the graph.
 
type:int — the type marker for the node.

showEdgeRecoveryInfo()method 
public function showEdgeRecoveryInfo(verbose:Boolean):void

this method shows all edges being split to planarize the graph and what has become of them (a list of subedges).

Parameters

verbose:Boolean — a boolean value to indicate the whether more or less information is wanted.

splitFace()method 
public function splitFace(_face:Face, _edge:Edge):Vector.<Object>

Splits a face into two parts by introducing an edge. The reverse edge is created.

Parameters

_face:Face — a face which is not a triangle.
 
_edge:Edge — an edge connecting two nodes in the face which are not already connected.

Returns
Vector.<Object>
splitFaceAt()method 
public function splitFaceAt(_face:Face, _e:Edge, _start:Edge, _stop:Edge):Vector.<Object>

Splits a face into two parts by introducing an edge. The reverse edge is created. The edges _start and _stop are given to overcome the insertion problems when the source or target of the inserted edge has bridges into the face to split.

Parameters

_face:Face — a face which is not a triangle.
 
_e:Edge — an edge connecting two nodes in the face which are not already connected.
 
_start:Edge — an edge after which edge _e is inserted. _start belongs to the one resulting face
 
_stop:Edge — the last edge of the other resulting face

Returns
Vector.<Object> — an array containing the two resulting faces
splitFaceWithSelfLoop()method 
public function splitFaceWithSelfLoop(faceEdge:Edge, selfLoop:Edge):void

Inserts one self-loop into an existing face.

Parameters

faceEdge:Edge
 
selfLoop:Edge

subdivideEdge()method 
public function subdivideEdge(edge:Edge):Node

Splits an edge into two parts by introducing a dummy node. The reverse edge is split too. Both edges are hidden.

Parameters

edge:Edge — the edge to be split

Returns
Node — the introduced dummy node.
subdivideEdgeMultiple()method 
public function subdivideEdgeMultiple(edge:Edge, count:int):EdgeList

Splits an edge into two parts by introducing a dummy node. The reverse edge is split too. Both edges are hidden.

Parameters

edge:Edge — the edge to be split
 
count:int

Returns
EdgeList — the introduced dummy node.
unsplitFace()method 
public function unsplitFace(e:Edge):void

this method unifies two faces separated by a single edge. The faces are identified via the the edge and its reverse

Parameters

e:Edge — edge that separates the two faces.

unsubdivideEdge()method 
public function unsubdivideEdge(dummyNode:Node):Edge

reconstruct the edge that was subdivided to gain the dummy node given as the parameter. This method is the complement of subdivideEdge.

Precondition the node is a crossing with crossing edge removed. This means that there are exactly two incoming and two outgoing edges. So the state is the same as after applying the subdivideEdge method.

Parameters

dummyNode:Node — a node representing a crossing

Returns
Edge
updateEdgeRecoveryInfo()method 
public function updateEdgeRecoveryInfo(e:Edge, segments:EdgeList, spec:int):void

this method collects bookkeeping information for consistent recovery. recovery means to reset the graph to the initial state (as it was on input). The meaning of the parameters e and segments depends on the recovery specifier spec.

Parameters

e:Edge — an edge that is either substituted by segments (spec = SPLIT) or that substitutes segments (spec = UNIFY)
 
segments:EdgeList — the path that is either substituted or substitutes an edge
 
spec:int — specifies whether an edge is split or a former splitting is undone.

Constant Detail
SPLITConstant
public static const SPLIT:int = 0

See also

UNIFYConstant 
public static const UNIFY:int = 1

See also