|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.planar.PlanarityTest
public class PlanarityTest
Implementation of a planarity test with linear time. This class can be used to test a graph for
planarity (isPlanar(Graph)
, to create a planar embedding of a planar graph (embed(PlanarInformation)
) or to
find a planar subgraph of a given graph and create an embedding for it (embedPlanarSubgraph(PlanarInformation)
).
Constructor Summary | |
---|---|
PlanarityTest()
Creates an instance of PlanarityAlgorithm. |
Method Summary | |
---|---|
boolean |
embed(PlanarInformation planar)
Creates an embedding of a given graph if it is planar. |
boolean |
embedPlanarSubgraph(PlanarInformation planar)
Runs a planarity test and constructs a valid embedding of the graph. |
EdgeList |
getNonEmbeddedEdges()
Returns a list of edges that were not added to the embedding in a run of embedPlanarSubgraph(PlanarInformation) |
boolean |
isPlanar(Graph graph)
Determines if the a given graph is planar. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PlanarityTest()
Method Detail |
---|
public boolean isPlanar(Graph graph)
graph
- The graph to test
true
, if the graph is planarpublic boolean embed(PlanarInformation planar)
PlanarInformation
which is
planar
- The PlanarInformation containing the graph to embed.
true
, if the embedding process was successful.public EdgeList getNonEmbeddedEdges()
embedPlanarSubgraph(PlanarInformation)
public boolean embedPlanarSubgraph(PlanarInformation planar)
getNonEmbeddedEdges()
.
planar
- The Graph to test, saved in a PlanarInformation data structure.
true
, if the graph is planar.
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |