public final class PlanarEmbedding extends Object
A planar embedding is represented by a list of faces. Each face is represented by a list of darts
which describe the border of the face.
| Constructor and Description |
|---|
PlanarEmbedding(Graph graph)
Creates a new embedding for the specified planar graph.
|
| Modifier and Type | Method and Description |
|---|---|
Dart |
getCyclicNext(Dart dart)
Returns the cyclic next dart of the given dart.
|
Dart |
getCyclicPrevious(Dart dart)
Returns the cyclic previous dart of the given dart.
|
Dart[] |
getDarts(Edge edge)
Returns the two darts associated with the given edge.
|
List<List<Dart>> |
getFaces()
Gets a
List of face lists. |
List<Dart> |
getOuterFace()
Gets the
List that represents the outer face. |
List<Dart> |
getOutgoingDarts(Node node)
Returns a
List containing the (cyclic ordered) outgoing darts of the specified node. |
static boolean |
isPlanar(Graph graph)
Return whether or not the given graph is planar.
|
public PlanarEmbedding(Graph graph)
IllegalArgumentException - if the specified graph is not planargraph - a planar graphpublic final Dart getCyclicNext(Dart dart)
dart - a dartpublic final Dart getCyclicPrevious(Dart dart)
dart - a dartpublic final Dart[] getDarts(Edge edge)
edge - an edgepublic final List<List<Dart>> getFaces()
List of face lists.
More precisely, each entry of this list is another list that contains all darts of a face.
List of face lists.public final List<Dart> getOuterFace()
List that represents the outer face.face lists.List that represents the outer facegetFaces()public final List<Dart> getOutgoingDarts(Node node)
List containing the (cyclic ordered) outgoing darts of the specified node.node - a nodeList containing the (cyclic ordered) outgoing dartspublic static final boolean isPlanar(Graph graph)
graph - the input graphtrue if the given graph is planar, false otherwise