|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.planar.SimplePlanarInformation
public class SimplePlanarInformation
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.
| Nested Class Summary | |
|---|---|
static class |
SimplePlanarInformation.SimpleEdgeInfo
Class hold all information related to an edge. |
| Field Summary | |
|---|---|
YList |
faceList
|
protected Graph |
graph
|
protected Face |
outerFace
|
| Constructor Summary | |
|---|---|
SimplePlanarInformation(Graph graph)
Returns a new instance of Planar Information for a graph. |
|
| Method Summary | |
|---|---|
void |
calcFaces()
Calculates the faces of the graph from a given edge order. |
void |
calcFaces(EdgeOrder edgeOrder)
Calculates the faces of the graph from the cyclic order of the edges around their source nodes. |
void |
calcOrdering()
Calculates the cyclic order of the edges around their source nodes from the set of faces of the graph. |
Face |
createFace(Edge edge,
EdgeOrder edgeOrder,
boolean[] mark)
Creates a face starting at an edge and using the cyclic order of the outgoing edges. |
FaceMap |
createFaceMap()
Creates a FaceMap for the faces in the graph. |
Edge |
createReverse(Edge edge)
Creates the reverse edge for a given edge. |
protected SimplePlanarInformation.SimpleEdgeInfo |
createSimpleEdgeInfo()
Factory to create edge tuples. |
Edge |
cyclicNextEdge(Edge edge)
Returns the counterclockwise next edge of an edge at the source node. |
Edge |
cyclicPrevEdge(Edge edge)
Returns the counterclockwise preceding edge of an edge at the source node. |
void |
dispose()
Remove all information from graph concerning planar Information: reverse Edge-Key,inserted reverse edges |
void |
disposeFaceMap(FaceMap map)
Disposes a FaceMap formerly created with createFaceMap(). |
int |
faceCount()
Returns the number of Faces. |
Face |
faceOf(Edge edge)
Get the face to which an edge belongs. |
FaceCursor |
faces()
Get cursor over faces. |
protected Edge |
followingEdge(Edge e)
Returns the counterclockwise next edge of another edge around a node |
Graph |
getGraph()
Returns the graph for which this planar information is kept. |
Face |
getOuterFace()
Returns the outer face of the planar graph |
Edge |
getReverse(Edge e)
Returns the reverse edge of an edge. |
protected SimplePlanarInformation.SimpleEdgeInfo |
getSimpleEdgeInfo(Edge edge)
Returns the information for an edge. |
boolean |
isInsertedEdge(Edge edge)
Returns if an edge is inserted in the planarization process or is an original edge of the input graph |
boolean |
isOuterFaceSetCorrectly()
Returns if the current planar embedding has a correctly set outer face. |
boolean |
isPlanar()
Returns if the current embedding defined by the faces is planar. |
void |
markAsInsertedEdge(Edge edge)
Marks an edge as inserted by an planarization process. |
void |
setFaceOf(Edge edge,
Face face)
Sets to which face an edge belongs. |
void |
setIsInsertedEdge(Edge edge,
boolean value)
Sets if an edge had been inserted in the planarization process. |
void |
setOuterFace(Face face)
Sets the outer(unbound,exterior) face of the planar graph. |
void |
setReverse(Edge e1,
Edge e2)
Set two edges as reverse to each other. |
void |
showCircularEdgeOrder()
Prints circular edge order on output. |
void |
showFaces()
Prints faces on output. |
String |
toString()
Returns a String of the list of faces |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Graph graph
public YList faceList
protected Face outerFace
| Constructor Detail |
|---|
public SimplePlanarInformation(Graph graph)
graph - The graph for which the planarity information is kept.| Method Detail |
|---|
public Graph getGraph()
public Edge createReverse(Edge edge)
edge - The edge for which the reverse edge is created
public void setReverse(Edge e1,
Edge e2)
e1 - An Edge in a graphe2 - An Edge in a graphpublic Edge getReverse(Edge e)
e - an edge
edgepublic FaceCursor faces()
public void setOuterFace(Face face)
face - A face in the planar embeddingpublic Face getOuterFace()
public int faceCount()
public Face faceOf(Edge edge)
edge - An edge in the graph
edge belongs
public void setFaceOf(Edge edge,
Face face)
edge - an edge in the graph.face - the new face.public void calcOrdering()
public void calcFaces()
public void calcFaces(EdgeOrder edgeOrder)
public Face createFace(Edge edge,
EdgeOrder edgeOrder,
boolean[] mark)
edge - an edge which belongs to the facemark - marks which edges already belong to a face.public FaceMap createFaceMap()
public void disposeFaceMap(FaceMap map)
createFaceMap().
map - the FaceMap to dispose.public Edge cyclicNextEdge(Edge edge)
edge - an edge.
edge
in ccw order around the source node of e.public Edge cyclicPrevEdge(Edge edge)
edge - an edge.
edge
in ccw order around the source node of e.protected Edge followingEdge(Edge e)
e - An edge
public boolean isPlanar()
true if the current set of faces describe
a planar embedding.public void dispose()
public boolean isOuterFaceSetCorrectly()
public String toString()
toString in class Objectpublic void markAsInsertedEdge(Edge edge)
edge - an edge in the graph
public void setIsInsertedEdge(Edge edge,
boolean value)
edge - an edge in the graphpublic boolean isInsertedEdge(Edge edge)
edge - An edge in the graph
true if the edge is inserted,
false otherwisepublic void showCircularEdgeOrder()
public void showFaces()
protected SimplePlanarInformation.SimpleEdgeInfo getSimpleEdgeInfo(Edge edge)
protected SimplePlanarInformation.SimpleEdgeInfo createSimpleEdgeInfo()
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||