Search this API

y.layout.planar
Class DualPlanarInformation

java.lang.Object
  extended by y.layout.planar.SimplePlanarInformation
      extended by y.layout.planar.DualPlanarInformation
All Implemented Interfaces:
SubdivisionHandler

public class DualPlanarInformation
extends SimplePlanarInformation
implements SubdivisionHandler

A class for all the dual graph stuff

 

Nested Class Summary
 
Nested classes/interfaces inherited from class y.layout.planar.SimplePlanarInformation
SimplePlanarInformation.SimpleEdgeInfo
 
Field Summary
 
Fields inherited from class y.layout.planar.SimplePlanarInformation
faceList, graph, outerFace
 
Constructor Summary
DualPlanarInformation(SimplePlanarInformation _realPlanar)
          Creates dual graph of an embedded graph.
DualPlanarInformation(SimplePlanarInformation _realPlanar, EdgeList hiddenEdges)
          Creates dual graph of an embedded graph.
 
Method Summary
protected  void checkConsistency()
           
 void computeDualGraph()
           
 void createCircularEdgeOrder()
          Creates the circular edge-order in the primal graph.
 void dispose()
          Undoes the changes in the graph.
 Edge getDualEdge(Edge _realEdge)
           
 Node getDualNode(Face _realFace)
           
 Edge getRealEdge(Edge _dualEdge)
           
 Face getRealFace(Node _dualNode)
           
 void splitFace(Edge edge, Face[] oldFaces, Face[] newFaces)
          A face is split by adding an edge.
 void subdivide(Edge e, Edge[] result)
          This method is handled every time the method subdivide (PlanarInformation) is invoked.
 void subscribe()
           
 void unsplitFace(Edge edge, Face[] oldFaces, Face[] newFaces)
          Faces are unsplit by removing an edge.
 void unsubdivide(Edge[] splitEdges, Edge e)
          This method transfers edge information from split edges to the resulting edge.
 void unsubscribe()
           
 
Methods inherited from class y.layout.planar.SimplePlanarInformation
calcFaces, calcFaces, calcOrdering, createFace, createFaceMap, createReverse, createSimpleEdgeInfo, cyclicNextEdge, cyclicPrevEdge, disposeFaceMap, faceCount, faceOf, faces, followingEdge, getGraph, getOuterFace, getReverse, getSimpleEdgeInfo, isInsertedEdge, isOuterFaceSetCorrectly, isPlanar, markAsInsertedEdge, setFaceOf, setIsInsertedEdge, setOuterFace, setReverse, showCircularEdgeOrder, showFaces, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DualPlanarInformation

public DualPlanarInformation(SimplePlanarInformation _realPlanar)
Creates dual graph of an embedded graph. Precondition: Faces of the embedded graph must be calculated.

Parameters:
_realPlanar - embedded graph.

DualPlanarInformation

public DualPlanarInformation(SimplePlanarInformation _realPlanar,
                             EdgeList hiddenEdges)
Creates dual graph of an embedded graph. Precondition: Faces of the embedded graph must be calculated.

Parameters:
_realPlanar - embedded graph.
Method Detail

subscribe

public void subscribe()

unsubscribe

public void unsubscribe()

getRealFace

public Face getRealFace(Node _dualNode)

getDualNode

public Node getDualNode(Face _realFace)

getRealEdge

public Edge getRealEdge(Edge _dualEdge)

getDualEdge

public Edge getDualEdge(Edge _realEdge)

computeDualGraph

public void computeDualGraph()

createCircularEdgeOrder

public void createCircularEdgeOrder()
Creates the circular edge-order in the primal graph.


subdivide

public void subdivide(Edge e,
                      Edge[] result)
Description copied from interface: SubdivisionHandler
This method is handled every time the method subdivide (PlanarInformation) is invoked. You can transfer edge information from the old edge to the new edges e.g. information from EdgeMaps.

Specified by:
subdivide in interface SubdivisionHandler

unsubdivide

public void unsubdivide(Edge[] splitEdges,
                        Edge e)
Description copied from interface: SubdivisionHandler
This method transfers edge information from split edges to the resulting edge.

Specified by:
unsubdivide in interface SubdivisionHandler

splitFace

public void splitFace(Edge edge,
                      Face[] oldFaces,
                      Face[] newFaces)
Description copied from interface: SubdivisionHandler
A face is split by adding an edge.

Specified by:
splitFace in interface SubdivisionHandler
Parameters:
edge - the edge which splits the face.
oldFaces - the faces in the old embedding which change.
newFaces - the faces in the new embedding which change.

unsplitFace

public void unsplitFace(Edge edge,
                        Face[] oldFaces,
                        Face[] newFaces)
Description copied from interface: SubdivisionHandler
Faces are unsplit by removing an edge.

Specified by:
unsplitFace in interface SubdivisionHandler
Parameters:
edge - the edge which unsplits the faces.
oldFaces - the faces in the old embedding which change.
newFaces - the faces in the new embedding which change.

dispose

public void dispose()
Undoes the changes in the graph.

Overrides:
dispose in class SimplePlanarInformation

checkConsistency

protected void checkConsistency()

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.