Search this API

y.layout.planar
Class PlanarityTestWrapper

java.lang.Object
  extended by y.layout.planar.PlanarityTestWrapper
All Implemented Interfaces:
InitialPlanarSubgraph

public class PlanarityTestWrapper
extends java.lang.Object
implements InitialPlanarSubgraph

A class used to wrap any instance of InitialPlanarSubgraph to make sure that the complete graph is obtained when using InitialPlanarSubgraph.createPlanarization(PlanarInformation).

 

Constructor Summary
PlanarityTestWrapper(InitialPlanarSubgraph nonPlanarGraphHandler)
          Creates an instance of PlanarityTestWrapper.
 
Method Summary
 void createPlanarization(PlanarInformation pi)
          Finds a planar subgraph in the specified graph and saves a planar embedding for it in pi.
 EdgeList getHiddenEdges()
          Returns a list of edges that were not added to the planar subgraph returned by the function createPlanarization(PlanarInformation).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlanarityTestWrapper

public PlanarityTestWrapper(InitialPlanarSubgraph nonPlanarGraphHandler)
Creates an instance of PlanarityTestWrapper.

Parameters:
nonPlanarGraphHandler - An instance of InitialPlanarSubgraph which will should be used for non-planar graphs.
See Also:
createPlanarization(PlanarInformation)
Method Detail

createPlanarization

public void createPlanarization(PlanarInformation pi)
Finds a planar subgraph in the specified graph and saves a planar embedding for it in pi. If the specified graph is planar, a planar embedding of the whole graph will be computed. Otherwise, another instance of InitialPlanarSubgraph will be used to compute a planar subgraph. If the computed subgraph does not contain all edges, a list of missing edges can be obtained with getHiddenEdges().

Specified by:
createPlanarization in interface InitialPlanarSubgraph
Parameters:
pi - The graph for which a planar Subgraph should be computed.
See Also:
PlanarityTestWrapper(InitialPlanarSubgraph)

getHiddenEdges

public EdgeList getHiddenEdges()
Returns a list of edges that were not added to the planar subgraph returned by the function createPlanarization(PlanarInformation). The function createPlanarization(PlanarInformation) must be called first.

Specified by:
getHiddenEdges in interface InitialPlanarSubgraph
Returns:
A list of edges that were hidden from the original graph.

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.