|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.layout.planar.SimplePlanarInformation | +--y.layout.planar.PlanarInformation
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.
Nested Class Summary | |
static class |
PlanarInformation.EdgeInfo
Class hold all information related to an edge. |
static class |
PlanarInformation.NodeInfo
Class hold all information related to a node. |
Nested classes inherited from class y.layout.planar.SimplePlanarInformation |
|
Field Summary | |
static int |
SPLIT
|
static int |
UNIFY
|
Fields inherited from class y.layout.planar.SimplePlanarInformation |
faceList, graph, outerFace |
Constructor Summary | |
PlanarInformation(Graph graph)
Returns a new instance of Planar Information for a graph. |
Method Summary | |
void |
addSubdivisionHandler(SubdivisionHandler handler)
|
Face |
bridgeFace(Edge e)
This method updates the faces of the graph when an edge is inserted which connects two diferent connected components. |
Face |
bridgeFace(Edge e,
Edge _start,
Edge _stop)
This method updates the faces of the graph when an edge is inserted which connects two diferent connected components. |
void |
checkEdgeRecovery()
Verifies if the edge recovery information is consistent. |
int |
countCrossings()
Returns the number of dummy nodes currently contained in the graph |
protected PlanarInformation.EdgeInfo |
createEdgeInfo()
Factory to create edge tupels. |
protected PlanarInformation.NodeInfo |
createNodeInfo()
Factory to create edge tupels. |
protected SimplePlanarInformation.SimpleEdgeInfo |
createSimpleEdgeInfo()
Factory to create edge tupels. |
void |
dispose()
Remove all information from graph concerning planar Information: reverse Edge-Key,inserted reverse edges |
void |
doEdgeRecovery()
this method restores all the substituted edges in the graph and removes the dummy nodes that represent crossings |
void |
doRemoveOriginalEdges(EdgeList _el)
Removes a list of edges from the graph. |
protected void |
fireSplitFaceEvent(Edge e,
Face[] oldFaces,
Face[] newFaces)
|
protected void |
fireSubdivisionEvent(Edge e,
Edge[] result)
|
protected void |
fireUnsplitFaceEvent(Edge e,
Face[] oldFaces,
Face[] newFaces)
|
protected void |
fireUnsubdivideEvent(Edge[] splitEdges,
Edge resultingEdge)
|
EdgeCursor |
getCurrentPath(Edge edge)
This method returns the path generated by split operations on one edge. |
protected PlanarInformation.EdgeInfo |
getEdgeInfo(Edge edge)
Returns the information for an edge. |
protected PlanarInformation.NodeInfo |
getNodeInfo(Node node)
Returns the information for an edge. |
int |
getType(Node node)
Returns the type of a node. |
Edge |
getUnsplitEdge(Edge edge)
This method returns the original edge for a split edge. |
void |
insertNodeWithEdge(Edge edge,
Node node,
Face face)
Insert a node with one edge into a face. |
boolean |
isBend(Node node)
Returns if a node is a dummy node representing a bend. |
boolean |
isCrossing(Node node)
Returns if a node is a dummy node representing a crossing. |
boolean |
isVertex(Node node)
Returns if a node is a real node and no dummy node. |
void |
markAsBend(Node node)
Sets, that a node should be handeled like a dummy node representing a bend. |
void |
markAsCrossing(Node node)
Marks a vertex as crossing. |
void |
markAsOriginalEdge(Edge edge)
Marks an edge as original |
void |
markAsVertex(Node node)
Sets, that a node should be handeled like a real node in a graph. |
void |
removeSubdivisionHandler(SubdivisionHandler handler)
|
void |
setType(Node node,
int type)
Sets the type for a node. |
void |
showEdgeRecoveryInfo(boolean verbose)
this method shows all edges being split to planarize the graph and what has become of them (a list of subedges). |
Face[] |
splitFace(Face _face,
Edge _edge)
Splits a face into two parts by introducing an edge. |
Face[] |
splitFace(Face _face,
Edge _e,
Edge _start,
Edge _stop)
Splits a face into two parts by introducing an edge. |
void |
splitFaceWithSelfLoop(Edge faceEdge,
Edge selfLoop)
Inserts one selfloop into an existing face. |
Node |
subdivideEdge(Edge edge)
Splits an edge into two parts by introducing a dummy node. |
EdgeList |
subdivideEdge(Edge edge,
int count)
Splits an edge into two parts by introducing a dummy node. |
void |
unsplitFace(Edge e)
this method unifies two faces seperated by a single edge. |
Edge |
unsubdivideEdge(Node dummyNode)
reconstruct the edge that was subdivided to gain the dummy node given as the parameter. |
void |
updateEdgeRecoveryInfo(Edge e,
EdgeList segments,
int spec)
this method collects bookkeeping information for consistent recovery. |
Methods inherited from class y.layout.planar.SimplePlanarInformation |
calcFaces, calcFaces, calcOrdering, createFace, createFaceMap, createReverse, 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 |
Field Detail |
public static final int UNIFY
public static final int SPLIT
Constructor Detail |
public PlanarInformation(Graph graph)
graph
- The graph for which the planarity information is kept.Method Detail |
public void dispose()
dispose
in class SimplePlanarInformation
public void setType(Node node, int type)
node
- a node in the graph.type
- the type marker for the node.public int getType(Node node)
node
- a node in the graph.
public boolean isCrossing(Node node)
node
- a node in the embedding
public void markAsCrossing(Node node)
node
- The dummy node that represents a crossingpublic void markAsBend(Node node)
public boolean isBend(Node node)
public boolean isVertex(Node node)
public void markAsVertex(Node node)
public int countCrossings()
public Face[] splitFace(Face _face, Edge _edge)
_face
- a face which is not a triangle._edge
- an edge connecting two nodes in the face which are not already
connected.public Face[] splitFace(Face _face, Edge _e, Edge _start, Edge _stop)
_face
- a face which is not a triangle._e
- an edge connecting two nodes in the face which are not already
connected._start
- an edge after which edge _e is inserted. _start belongs to
the one resulting face_stop
- the last edge of the other resulting face
public void splitFaceWithSelfLoop(Edge faceEdge, Edge selfLoop)
public Face bridgeFace(Edge e, Edge _start, Edge _stop)
e
- edge that connects two connected components._start
- the predecessor of e in the cyclic ordering on the source
node of e, or null, if no specific predecessor is wanted._stop
-
public Face bridgeFace(Edge e)
e
- edge that connects two connected components.public void unsplitFace(Edge e)
e
- edge that seperates the two faces.public void insertNodeWithEdge(Edge edge, Node node, Face face)
edge
- the edge to be inserted with the nodenode
- the node that is insertedface
- the face in which the node is insertedpublic Node subdivideEdge(Edge edge)
edge
- the edge to be split
public EdgeList subdivideEdge(Edge edge, int count)
edge
- the edge to be split
public Edge unsubdivideEdge(Node dummyNode)
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.
dummyNode
- a node representing a crossingpublic void addSubdivisionHandler(SubdivisionHandler handler)
public void removeSubdivisionHandler(SubdivisionHandler handler)
protected void fireSubdivisionEvent(Edge e, Edge[] result)
protected void fireUnsubdivideEvent(Edge[] splitEdges, Edge resultingEdge)
protected void fireSplitFaceEvent(Edge e, Face[] oldFaces, Face[] newFaces)
protected void fireUnsplitFaceEvent(Edge e, Face[] oldFaces, Face[] newFaces)
public EdgeCursor getCurrentPath(Edge edge)
edge
- an edge currently in the graph, or which has been in the
graph and has been split.public Edge getUnsplitEdge(Edge edge)
public void updateEdgeRecoveryInfo(Edge e, EdgeList segments, int spec)
e
- an edge that is either substituted by segments (spec = SPLIT)
or that substitutes segments (spec = UNIFY)segments
- the path that is either substituted or substitutes an edgespec
- specifies wheter an edge is split or a former splitting
is undone.public void doEdgeRecovery()
public void doRemoveOriginalEdges(EdgeList _el)
subdivideEdge
method.
In this case the edges resulting from the subdivide operation are removed.
_el
- the list of edges which should be removed.public void markAsOriginalEdge(Edge edge)
edge
- an edge that is as it was on insertion (not a segment of a
split edge.protected PlanarInformation.NodeInfo getNodeInfo(Node node)
protected PlanarInformation.NodeInfo createNodeInfo()
protected PlanarInformation.EdgeInfo getEdgeInfo(Edge edge)
protected PlanarInformation.EdgeInfo createEdgeInfo()
protected SimplePlanarInformation.SimpleEdgeInfo createSimpleEdgeInfo()
createSimpleEdgeInfo
in class SimplePlanarInformation
public void checkEdgeRecovery()
public void showEdgeRecoveryInfo(boolean verbose)
verbose
- a boolean value to indicate the wheter more or less
information is wanted.
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |