Packagecom.yworks.yfiles.layout.planar
Classpublic class SimplePlanarInformation
InheritanceSimplePlanarInformation Inheritance YObject Inheritance Object
Subclasses DualPlanarInformation, PlanarInformation

This class defines a planar embedded graph. It manages the faces and reverse edges of a planar graph. The planar embedding of a graph is defined by the ordering of the outgoing edges around a node and its faces. The ordering is assumed to be in mathematical positive sense, i.e., counter-clockwise ordering. Note that computer output devices usually have a mirrored coordinate system (they have the origin in the upper left corner of the output device and the y-axis pointing downward). On these devices, the mathematically positive orientation corresponds to a clockwise ordering, albeit the ordering is counter-clockwise in a pure mathematical sense.



Public Properties
 PropertyDefined By
  faceList : YList
SimplePlanarInformation
  graph : Graph
[read-only] Returns the graph for which this planar information is kept.
SimplePlanarInformation
  outerFace : Face
Getter: Returns the outer face of the planar graph Setter: Sets the outer(unbound,exterior) face of the planar graph.
SimplePlanarInformation
  outerFaceSetCorrectly : Boolean
[read-only] Returns if the current planar embedding has a correctly set outer face.
SimplePlanarInformation
  planar : Boolean
[read-only] Returns if the current embedding defined by the faces is planar.
SimplePlanarInformation
Protected Properties
 PropertyDefined By
  _graph : Graph
SimplePlanarInformation
  _outerFace : Face
SimplePlanarInformation
Public Methods
 MethodDefined By
  
SimplePlanarInformation(graph:Graph, init:Boolean = true)
Returns a new instance of Planar Information for a graph.
SimplePlanarInformation
  
calcFaces():void
Calculates the faces of the graph from a given edge order.
SimplePlanarInformation
  
Calculates the faces of the graph from the cyclic order of the edges around their source nodes.
SimplePlanarInformation
  
Calculates the cyclic order of the edges around their source nodes from the set of faces of the graph.
SimplePlanarInformation
  
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
  
Creates a FaceMap for the faces in the graph.
SimplePlanarInformation
  
Creates the reverse edge for a given edge.
SimplePlanarInformation
  
Returns the counterclockwise next edge of an edge at the source node.
SimplePlanarInformation
  
Returns the counterclockwise preceding edge of an edge at the source node.
SimplePlanarInformation
  
dispose():void
Remove all information from graph concerning planar Information: reverse Edge-Key,inserted reverse edges
SimplePlanarInformation
  
Disposes a FaceMap formerly created with createFaceMap().
SimplePlanarInformation
 Inherited
equals(o:Object):Boolean
YObject
  
faceCount():int
Returns the number of Faces.
SimplePlanarInformation
  
Get the face to which an edge belongs.
SimplePlanarInformation
  
Get cursor over faces.
SimplePlanarInformation
  
getClass():Class
[override]
SimplePlanarInformation
  
Returns the reverse edge of an edge.
SimplePlanarInformation
 Inherited
hashCode():int
YObject
  
isInsertedEdge(edge:Edge):Boolean
Returns if an edge is inserted in the planarization process or is an original edge of the input graph
SimplePlanarInformation
  
Marks an edge as inserted by an planarization process.
SimplePlanarInformation
  
[static] Returns a new instance of Planar Information for a graph.
SimplePlanarInformation
  
setFaceOf(edge:Edge, face:Face):void
Sets to which face an edge belongs.
SimplePlanarInformation
  
setIsInsertedEdge(edge:Edge, value:Boolean):void
Sets if an edge had been inserted in the planarization process.
SimplePlanarInformation
  
setReverse(e1:Edge, e2:Edge):void
Set two edges as reverse to each other.
SimplePlanarInformation
  
Prints circular edge order on output.
SimplePlanarInformation
  
showFaces():void
Prints faces on output.
SimplePlanarInformation
  
toString():String
Returns a String of the list of faces
SimplePlanarInformation
Protected Methods
 MethodDefined By
  
Factory to create edge tuples.
SimplePlanarInformation
  
Returns the counterclockwise next edge of another edge around a node
SimplePlanarInformation
  
Returns the information for an edge.
SimplePlanarInformation
  
Initializes this object.
SimplePlanarInformation
Property Detail
_graphproperty
protected var _graph:Graph

_outerFaceproperty 
protected var _outerFace:Face

faceListproperty 
public var faceList:YList

graphproperty 
graph:Graph  [read-only]

Returns the graph for which this planar information is kept.


Implementation
    public function get graph():Graph
outerFaceproperty 
outerFace:Face

Getter: Returns the outer face of the planar graph

Setter: Sets the outer(unbound,exterior) face of the planar graph.


Implementation
    public function get outerFace():Face
    public function set outerFace(value:Face):void
outerFaceSetCorrectlyproperty 
outerFaceSetCorrectly:Boolean  [read-only]

Returns if the current planar embedding has a correctly set outer face.


Implementation
    public function get outerFaceSetCorrectly():Boolean
planarproperty 
planar:Boolean  [read-only]

Returns if the current embedding defined by the faces is planar.

Precondition The faces of the graph must be calculated.


Implementation
    public function get planar():Boolean
Constructor Detail
SimplePlanarInformation()Constructor
public function SimplePlanarInformation(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
calcFaces()method
public function calcFaces():void

Calculates the faces of the graph from a given edge order.

Precondition Every edge has a reverse edge and the order of the outgoing edges around a node represent a planar embedding of the graph

calcFacesWithOrder()method 
public function calcFacesWithOrder(edgeOrder:EdgeOrder):void

Calculates the faces of the graph from the cyclic order of the edges around their source nodes.

Precondition Every edge has a reverse edge and the order of the outgoing edges around a node represent a planar embedding of the graph

Parameters

edgeOrder:EdgeOrder

calcOrdering()method 
public function calcOrdering():void

Calculates the cyclic order of the edges around their source nodes from the set of faces of the graph.

Precondition The set of faces in the graph represents a planar embedding.

createFace()method 
public function 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. The new face is inserted in the face list.

Parameters

edge:Edge — an edge which belongs to the face
 
edgeOrder:EdgeOrder
 
mark:Vector.<Boolean> — marks which edges already belong to a face.

Returns
Face
createFaceMap()method 
public function createFaceMap():FaceMap

Creates a FaceMap for the faces in the graph.

Returns
FaceMap — an instance of FaceMap
createReverse()method 
public function createReverse(edge:Edge):Edge

Creates the reverse edge for a given edge.

Parameters

edge:Edge — The edge for which the reverse edge is created

Returns
Edge — The new created reverse Edge
createSimpleEdgeInfo()method 
protected function createSimpleEdgeInfo():SimplePlanarInformation_SimpleEdgeInfo

Factory to create edge tuples.

Returns
SimplePlanarInformation_SimpleEdgeInfo
cyclicNextEdge()method 
public function cyclicNextEdge(edge:Edge):Edge

Returns the counterclockwise next edge of an edge at the source node.

Parameters

edge:Edge — an edge.

Returns
Edge — The edge following edge in ccw order around the source node of e.
cyclicPrevEdge()method 
public function cyclicPrevEdge(edge:Edge):Edge

Returns the counterclockwise preceding edge of an edge at the source node.

Parameters

edge:Edge — an edge.

Returns
Edge — The edge preceding edge in ccw order around the source node of e.
dispose()method 
public function dispose():void

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

disposeFaceMap()method 
public function disposeFaceMap(map:FaceMap):void

Disposes a FaceMap formerly created with createFaceMap().

Parameters

map:FaceMap — the FaceMap to dispose.

faceCount()method 
public function faceCount():int

Returns the number of Faces.

Returns
int — The number of faces in this planar embedding
faceOf()method 
public function faceOf(edge:Edge):Face

Get the face to which an edge belongs.

Parameters

edge:Edge — An edge in the graph

Returns
Face — The face to which edge belongs
faces()method 
public function faces():FaceCursor

Get cursor over faces. The faces are edge lists

Returns
FaceCursor — a cursor over all faces of this planar embedding
followingEdge()method 
protected function followingEdge(e:Edge):Edge

Returns the counterclockwise next edge of another edge around a node

Parameters

e:Edge — An edge

Returns
Edge — The edge following e in ccw order around the target node of e
getClass()method 
override public function getClass():Class

Returns
Class
getReverse()method 
public function getReverse(e:Edge):Edge

Returns the reverse edge of an edge.

Parameters

e:Edge — an edge

Returns
Edge — the reverse edge of edge
getSimpleEdgeInfo()method 
protected function getSimpleEdgeInfo(edge:Edge):SimplePlanarInformation_SimpleEdgeInfo

Returns the information for an edge.

Parameters

edge:Edge

Returns
SimplePlanarInformation_SimpleEdgeInfo
initSimplePlanarInformation()method 
protected final function initSimplePlanarInformation(graph:Graph):void

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

Parameters

graph:Graph

See also

isInsertedEdge()method 
public function isInsertedEdge(edge:Edge):Boolean

Returns if an edge is inserted in the planarization process or is an original edge of the input graph

Parameters

edge:Edge — An edge in the graph

Returns
Booleantrue if the edge is inserted, false otherwise
markAsInsertedEdge()method 
public function markAsInsertedEdge(edge:Edge):void

Marks an edge as inserted by an planarization process.

Parameters

edge:Edge — an edge in the graph

newSimplePlanarInformation()method 
public static function newSimplePlanarInformation(graph:Graph):SimplePlanarInformation

Returns a new instance of Planar Information for a graph.

Parameters

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

Returns
SimplePlanarInformation
setFaceOf()method 
public function setFaceOf(edge:Edge, face:Face):void

Sets to which face an edge belongs.

Parameters

edge:Edge — an edge in the graph.
 
face:Face — the new face.

setIsInsertedEdge()method 
public function setIsInsertedEdge(edge:Edge, value:Boolean):void

Sets if an edge had been inserted in the planarization process.

Parameters

edge:Edge — an edge in the graph
 
value:Boolean

setReverse()method 
public function setReverse(e1:Edge, e2:Edge):void

Set two edges as reverse to each other.

Precondition source(e1) = target(e2), target(e1) = source(e2)

Parameters

e1:Edge — An Edge in a graph
 
e2:Edge — An Edge in a graph

showCircularEdgeOrder()method 
public function showCircularEdgeOrder():void

Prints circular edge order on output.

showFaces()method 
public function showFaces():void

Prints faces on output.

toString()method 
public function toString():String

Returns a String of the list of faces

Returns
String