|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
An interface describing an embedded planar graph. In an embedded planar graph the ordering of the edges incident with a vertex is given by a planar embedding of the graph. The graph must be connected. Directed and undirected edges may coexist. Multiple edges and self-loops are allowed. A position and its dual position may store different elements (the actual behavior is implementation-dependent). If an edge is directed, its dual edge need not be (the actual behavior is implementation-dependent). Structural changes to the embedded planar graph affect also the dual.
| Method Summary | |
Edge |
attachVertex(Vertex v,
Order order,
Edge e,
Face f,
java.lang.Object vertexInfo,
java.lang.Object edgeInfo)
Attaches a new vertex to an existing vertex by inserting a new edge in a specified order. |
Edge |
attachVertexFrom(Vertex origin,
Order order,
Edge e,
Face f,
java.lang.Object vertexInfo,
java.lang.Object edgeInfo)
Attaches a new vertex by inserting a new directed edge in a specified order from an existing vertex. |
Edge |
attachVertexTo(Vertex destination,
Order order,
Edge e,
Face f,
java.lang.Object vertexInfo,
java.lang.Object edgeInfo)
Attaches a new vertex by inserting a new directed edge in a specified order to an existing vertex. |
EmbeddedPlanarGraph |
dual()
|
Edge |
insertDirectedEdge(Vertex v1,
Order order1,
Edge e1,
Vertex v2,
Order order2,
Edge e2,
Face f,
java.lang.Object info)
Inserts a new directed edge from an existing origin vertex to an existing destination vertex in a specified order; the two vertices must be incident on a common face. |
Edge |
insertEdge(Vertex v1,
Order order1,
Edge e1,
Vertex v2,
Order order2,
Edge e2,
Face f,
java.lang.Object info)
Inserts a new edge between two existing vertices in a specified order; the two vertices must be incident with a common face. |
Face |
removeEdge(Edge e)
Removes an edge. |
Face |
removeVertex(Vertex v)
Removes a vertex and all its incident edges. |
void |
setDirectionFrom(Edge e,
Vertex v)
Sets the direction of an edge away from a vertex. |
void |
setDirectionTo(Edge e,
Vertex v)
Sets the direction of an edge towards a vertex. |
void |
setLeftFace(Edge e,
Face f)
Sets the direction of an edge so that a face is its left face. |
void |
setRightFace(Edge e,
Face f)
Sets the direction of an edge so that a face is its right face. |
Edge |
splitVertex(Vertex v,
Edge e1,
Face f1,
Edge e2,
Face f2,
java.lang.Object edgeinfo)
Splits an existing vertex into two new vertices connected by a new edge. |
Vertex |
unsplitVertex(Edge e,
java.lang.Object vertexinfo)
Merges two adjacent vertices and removes the edge(s) connecting them. |
| Methods inherited from interface jdsl.map.api.InspectableEmbeddedPlanarGraph |
aCommonFace, aCommonFace, adjacentFaces, aFace, anIncidentEdge, anIncidentFace, anIncidentVertex, areAdjacent, areAdjacent, areIncident, areIncident, connectingEdges, degree, dual, dual, dual, faces, incidentEdge, incidentEdge, incidentEdges, incidentFace, incidentFaces, incidentFaces, incidentVertex, incidentVertices, inspectableDual, leftFace, numFaces, opposite, rightFace |
| Methods inherited from interface jdsl.graph.api.InspectableGraph |
aCommonVertex, aConnectingEdge, adjacentVertices, adjacentVertices, anEdge, anIncidentEdge, anIncidentEdge, areAdjacent, areIncident, aVertex, connectingEdges, degree, degree, destination, directedEdges, edges, endVertices, incidentEdges, incidentEdges, isDirected, numEdges, numVertices, opposite, origin, undirectedEdges, vertices |
| Methods inherited from interface jdsl.core.api.InspectablePositionalContainer |
positions |
| Methods inherited from interface jdsl.core.api.InspectableContainer |
contains, elements, isEmpty, size |
| Methods inherited from interface jdsl.graph.api.ModifiableGraph |
makeUndirected, reverseDirection, splitEdge, unsplitEdge |
| Methods inherited from interface jdsl.core.api.PositionalContainer |
swapElements |
| Methods inherited from interface jdsl.core.api.Container |
newContainer, replaceElement |
| Method Detail |
public void setDirectionFrom(Edge e,
Vertex v)
throws InvalidAccessorException,
InvalidEdgeException,
InvalidVertexException
setDirectionFrom in interface ModifiableGraphe - an edgev - an endvertex of eInvalidAccessorException - if e or v is null or not
contained in this graphInvalidEdgeException - if e is a self-loopInvalidVertexException - if v is not an endvertex of esetLeftFace(Edge,Face),
setRightFace(Edge,Face)
public void setDirectionTo(Edge e,
Vertex v)
throws InvalidAccessorException,
InvalidEdgeException,
InvalidVertexException
setDirectionTo in interface ModifiableGraphe - an edgev - an endvertex of eInvalidAccessorException - if e or v is null or not
contained in this graphInvalidEdgeException - if e is a self-loopInvalidVertexException - if v is not an endvertex of esetLeftFace(Edge,Face),
setRightFace(Edge,Face)
public void setLeftFace(Edge e,
Face f)
throws InvalidAccessorException,
InvalidFaceException
e - an edgef - a face incident with eInvalidAccessorException - if e or f is null or not
contained in this graphInvalidFaceException - if f is not incident with e
public void setRightFace(Edge e,
Face f)
throws InvalidAccessorException,
InvalidFaceException
e - an edgef - a face incident with eInvalidAccessorException - if e or f is null or not
contained in this graphInvalidFaceException - if f is not incident with e
public Edge attachVertex(Vertex v,
Order order,
Edge e,
Face f,
java.lang.Object vertexInfo,
java.lang.Object edgeInfo)
throws InvalidAccessorException,
InvalidOrderException,
InvalidEdgeException,
InvalidFaceException
v - a vertexorder - indicates if the new edge is to be inserted
Order.AFTER_CW or Order.AFTER_CCW e around ve - an edge incident with v or Edge.NONE if v is an isolated
vertexf - a face incident with e; this parameter is
meaningful only if e is a self-loop, otherwise null can be
passed; the new vertex and the new edge will be incident with
this facevertexInfo - the object to be stored in the new vertex and
in its dual faceedgeInfo - the object to be stored in the new edge and in
its dual edgeInvalidAccessorException - if v or e (or f, if
meaningful) is null or not contained in this graphInvalidOrderException - if order is different from
Order.AFTER_CW or Order.AFTER_CCWInvalidEdgeException - if e is not an edge incident with
v, or if Edge.NONE is passed as the edge parameter and v is not
an isolated vertex, or if Edge.NONE is not passed as the edge
parameter and v is an isolated vertexInvalidFaceException - if e is a self-loop and f is not
a face incident with eInspectableGraph.opposite(Vertex,Edge)
public Edge attachVertexFrom(Vertex origin,
Order order,
Edge e,
Face f,
java.lang.Object vertexInfo,
java.lang.Object edgeInfo)
throws InvalidAccessorException,
InvalidOrderException,
InvalidEdgeException,
InvalidFaceException
origin - a vertexorder - indicates if the new edge is to be inserted
Order.AFTER_CW or Order.AFTER_CCW e around ve - an edge incident with v or Edge.NONE if v is an isolated
vertexf - a face incident with e; this parameter is
meaningful only if e is a self-loop, otherwise null can be
passed; the new vertex and the new edge will be incident with
this facevertexInfo - the object to be stored in the new vertex and
in its dual faceedgeInfo - the object to be stored in the new edge and in
its dual edgeInvalidAccessorException - if v or e (or f, if
meaningful) is null or not contained in this graphInvalidOrderException - if order is different from
Order.AFTER_CW or Order.AFTER_CCWInvalidEdgeException - if e is not an edge incident with
v, or if Edge.NONE is passed as the edge parameter and v is not an
isolated vertex, or if Edge.NONE is not passed as the edge
parameter and v is an isolated vertexInvalidFaceException - if e is a self-loop and f is not
a face incident with eInspectableGraph.opposite(Vertex,Edge)
public Edge attachVertexTo(Vertex destination,
Order order,
Edge e,
Face f,
java.lang.Object vertexInfo,
java.lang.Object edgeInfo)
throws InvalidVertexException,
InvalidOrderException,
InvalidEdgeException,
InvalidFaceException
destination - a vertexorder - indicates if the new edge is to be inserted
Order.AFTER_CW or Order.AFTER_CCW e around ve - an edge incident with v or Edge.NONE if v is an isolated
vertexf - a face incident with e; this parameter is
meaningful only if e is a self-loop, otherwise null can be
passed; the new vertex and the new edge will be incident with
this facevertexInfo - the object to be stored in the new vertex and
in its dual faceedgeInfo - the object to be stored in the new edge and in
its dual edgeInvalidAccessorException - if v or e (or f, if
meaningful) is null or not contained in this graphInvalidOrderException - if order is different from
Order.AFTER_CW or Order.AFTER_CCWInvalidEdgeException - if e is not an edge incident with
v, or if Edge.NONE is passed as the edge parameter and v is not an
isolated vertex, or if Edge.NONE is not passed as the edge
parameter and v is an isolated vertexInvalidFaceException - if e is a self-loop and f is not
a face incident with eInspectableGraph.opposite(Vertex,Edge)
public Edge insertEdge(Vertex v1,
Order order1,
Edge e1,
Vertex v2,
Order order2,
Edge e2,
Face f,
java.lang.Object info)
throws InvalidAccessorException,
InvalidOrderException,
InvalidEdgeException,
InvalidFaceException,
PlanarityViolationException
element() can still be
retrieved. Two new adjacent faces storing null are
inserted.v1 - the first endvertexorder1 - indicates if the new edge is to be inserted
Order.AFTER_CW or Order.AFTER_CCW e1 around v1e1 - an edge incident with v1 or Edge.NONE if v is an
isolated vertexv2 - the second endvertexorder2 - indicates if the new edge is to be inserted
Order.AFTER_CW or Order.AFTER_CCW e2 around v2e2 - an edge incident with v2 or Edge.NONE if v is an
isolated vertexf - a face incident with e1 (e2);
this parameter is meaningful only if e1
(e2) is a self-loop, otherwise null can be passed;
the new edge will split this faceinfo - the object to be stored in the new edge and in its
dual edgeInvalidAccessorException - if v1, e1, v2, or e2 (or f,
if meaningful) is null or not contained in this graphInvalidOrderException - if order is different from
Order.AFTER_CW or Order.AFTER_CCWInvalidEdgeException - if e1 (e2) is not an edge
incident with v1 (v2), or if Edge.NONE is passed as the edge
parameter and v1 (v2) is not an isolated vertex, or if Edge.NONE
is not passed as the edge parameter and v1 (v2) is an isolated
vertexInvalidFaceException - if e1 (e2) is a self-loop and f
is not a face incident with e1 (e2)PlanarityViolationException - if the face identified by
v1, order1, e1 is different from the face identified by v2,
order2, e2
public Edge insertDirectedEdge(Vertex v1,
Order order1,
Edge e1,
Vertex v2,
Order order2,
Edge e2,
Face f,
java.lang.Object info)
throws InvalidAccessorException,
InvalidOrderException,
InvalidEdgeException,
InvalidFaceException,
PlanarityViolationException
element() can still be retrieved. Two
new adjacent faces storing null are inserted.v1 - the origin vertexorder1 - indicates if the new edge is to be inserted
Order.AFTER_CW or Order.AFTER_CCW e1 around v1e1 - an edge incident with v1 or Edge.NONE if v is an
isolated vertexv2 - the destination vertexorder2 - indicates if the new edge is to be inserted
Order.AFTER_CW or Order.AFTER_CCW e2 around v2e2 - an edge incident with v2 or Edge.NONE if v is an
isolated vertexf - a face incident with e1 (v2);
this parameter is meaningful only if e1
(e2) is a self-loop, otherwise null can be passed;
the new edge will split this faceinfo - the object to be stored in the new edge and in its
dual edgeInvalidAccessorException - if v1, e1, v2, or e2 (or f,
if meaningful) is null or not contained in this graphInvalidOrderException - if order is different from
Order.AFTER_CW or Order.AFTER_CCWInvalidEdgeException - if e1 (e2) is not an edge
incident with v1 (v2), or if Edge.NONE is passed as the edge
parameter and v1 (v2) is not an isolated vertex, or if Edge.NONE
is not passed as the edge parameter and v1 (v2) is an isolated
vertexInvalidFaceException - if e1 (e2) is a self-loop and f
is not a face incident with e1 (e2)PlanarityViolationException - if the face identified by
v1, order1, e1 is different from the face identified by v2,
order2, e2
public Face removeVertex(Vertex v)
throws InvalidAccessorException,
ConnectivityViolationException
null is inserted. If you
need the elements stored at the removed vertex, edges, and faces,
get them beforehand.v - the vertex to be removedv, if
degree(v) > 1; the face incident with
v, if degree(v) == 1InvalidAccessorException - if v is null or not contained
in this graphConnectivityViolationException - if the vertex removal
disconnects the graph
public Face removeEdge(Edge e)
throws InvalidAccessorException,
ConnectivityViolationException
null is inserted. If
you need the elements stored at the removed edge and faces, get
them beforehand.e - the edge to be removedeInvalidAccessorException - if e is null or not contained
in this graphConnectivityViolationException - if the edge removal
disconnects the graph
public Edge splitVertex(Vertex v,
Edge e1,
Face f1,
Edge e2,
Face f2,
java.lang.Object edgeinfo)
throws InvalidAccessorException,
InvalidEdgeException,
InvalidFaceException
e1 e1
\ / \ /
-O- ---> -O---O-
/ \ / \
e2 e2
v - the vertex to be splite1 - an edge incident with v or Edge.NONE if v is an
isolated vertexf1 - a face incident with e1; this parameter is meaningful
only if e1 is a self-loop, otherwise null can be passed; the new
edge will be incident with this facee2 - an edge incident with v or Edge.NONE if v is an
isolated vertexf2 - a face incident with e2; this parameter is meaningful
only if e2 is a self-loop, otherwise null can be passed; the new
edge will be incident with this faceedgeinfo - the object to be stored in the new edge and in
its dual edgeInvalidAccessorException - if v, e1, or e2 (or f1 or f2,
if meaningful) is null or not contained in this graphInvalidEdgeException - if e1 or e2 is not an edge
incident with v, or if Edge.NONE is passed as e1 or e2 and v is
not an isolated vertex, or if Edge.NONE is not passed as e1 and
e2 and v is an isolated vertexInvalidFaceException - if e1 (e2) is a self-loop and f1
(f2) is not a face incident with e1 (e2)InspectableGraph.endVertices(Edge)
public Vertex unsplitVertex(Edge e,
java.lang.Object vertexinfo)
throws InvalidAccessorException,
InvalidEdgeException
\ e / \ /
-O---O- ---> -O-
/ \ / \
e - the edge to be removedvertexinfo - the object to be stored in the new vertex and
in its dual faceInvalidAccessorException - if e is null or not contained
in this graphInvalidEdgeException - if e is a self-looppublic EmbeddedPlanarGraph dual()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||