|
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.GT
public class GT
This class implements a powerful planar-subgraph heuristic. The heuristic is an extension of the Goldschmidt/Takvorian Algorithm which is described in Eiglsperger/Kaufmann.
Nested Class Summary | |
---|---|
static class |
GT.EdgeListComparator
|
static class |
GT.MIS1Comparator
Defines ordering for edges in the the first Maximum Independent Set. |
static class |
GT.MIS2Comparator
Defines ordering for edges in the second Maximum Independent Set. |
Field Summary | |
---|---|
protected GT.EdgeListComparator |
edgeListComparator
|
protected Node |
globalSink
|
protected Node |
globalSource
|
protected Graph |
graph
|
protected EdgeList |
hiddenEdges
|
protected boolean |
isValid
|
protected GT.MIS1Comparator |
mis1Comparator
|
protected GT.MIS2Comparator |
mis2Comparator
|
protected Edge |
outerFaceDeterminationEdge
|
protected Node |
outerFaceDeterminationNode
|
protected PlanarInformation |
planar
|
protected VertexOrder |
vertexOrder
|
Constructor Summary | |
---|---|
GT()
Returns a new instance of GT . |
Method Summary | |
---|---|
protected void |
calcMISIncidents(EdgeList MIS,
NodeMap MISIncidents)
Calculates form the independent set of edges, the edges incident to an node which are inside this independent set. |
protected NodeList |
calcOrdering(int[] orderNumbers,
OverlapGraphMIS mis)
|
protected void |
createCircularEdgeOrder(EdgeList MIS1,
EdgeList MIS2,
NodeMap downwardLink,
NodeMap upwardLink,
int[] orderNumbers)
this method sorts each nodes incident edges according to the aim of yielding a planar embedding for a subgraph of the input graph It also assigns first incoming/outgoing. |
void |
createPlanarization(PlanarInformation p)
This method planarizes a graph by finding (a maximum) planar sub- graph. |
protected void |
createReverseEdges()
|
void |
dispose()
Cleaning up resources. |
boolean |
getAllowRandomization()
Returns if the algorithm will use randomization to improve the result. |
EdgeList |
getHiddenEdges()
Returns a list of the edges that have been removed in order to gain a planarization of the input graph. |
int |
getIterations()
Returns number of iterations when randomization is used. |
Node |
getSink()
Returns the sink of the st-graph. |
Node |
getSource()
Returns the source of the st-graph. |
protected void |
initOrdering(NodeMap downwardLink,
NodeMap upwardLink,
NodeList orderedNodes)
Initializes data structures from an ordering. |
void |
setAllowRandomization(boolean value)
Sets if the algorithm will use randomization to improve the result. |
void |
setIterations(int _iterations)
Set number of iterations when randomization is used. |
protected void |
showEdgePartitionResult(java.util.ArrayList MIS1,
java.util.ArrayList MIS2)
|
protected void |
showGraphicDebug(EdgeList MIS1,
EdgeList MIS2,
int[] orderNumbers)
|
protected void |
showIncidentEdges(NodeMap MIS1Incidents,
NodeMap MIS2Incidents,
EdgeMap downwardLink,
EdgeMap upwardLink)
|
protected void |
showVertexOrder(int[] orderNumbers)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected GT.EdgeListComparator edgeListComparator
protected GT.MIS1Comparator mis1Comparator
protected GT.MIS2Comparator mis2Comparator
protected PlanarInformation planar
protected Graph graph
protected boolean isValid
protected VertexOrder vertexOrder
protected Edge outerFaceDeterminationEdge
protected Node outerFaceDeterminationNode
protected EdgeList hiddenEdges
protected Node globalSource
protected Node globalSink
Constructor Detail |
---|
public GT()
GT
.
Method Detail |
---|
public void setAllowRandomization(boolean value)
value
- if true
the undirected edges in the graph
are directed.public boolean getAllowRandomization()
public void setIterations(int _iterations)
public int getIterations()
public EdgeList getHiddenEdges()
createPlanarization
method of this class must have been
called earlier to compute the list of hidden edges.
If not so, a runtime exception is thrown!
getHiddenEdges
in interface InitialPlanarSubgraph
java.lang.RuntimeException
- if createPlanarization
has not been
called prior to calling this method.createPlanarization(PlanarInformation)
public Node getSource()
public Node getSink()
public void createPlanarization(PlanarInformation p)
getHiddenEdges()
below. A circular edge
order is also computed.
Note: the input graph is modified
createPlanarization
in interface InitialPlanarSubgraph
p
- the PlanarInformation
object associated with the
input graphprotected NodeList calcOrdering(int[] orderNumbers, OverlapGraphMIS mis)
orderNumbers
- mis
- protected void initOrdering(NodeMap downwardLink, NodeMap upwardLink, NodeList orderedNodes)
protected void calcMISIncidents(EdgeList MIS, NodeMap MISIncidents)
protected void createCircularEdgeOrder(EdgeList MIS1, EdgeList MIS2, NodeMap downwardLink, NodeMap upwardLink, int[] orderNumbers)
protected void createReverseEdges()
public void dispose()
protected void showVertexOrder(int[] orderNumbers)
protected void showEdgePartitionResult(java.util.ArrayList MIS1, java.util.ArrayList MIS2)
protected void showGraphicDebug(EdgeList MIS1, EdgeList MIS2, int[] orderNumbers)
protected void showIncidentEdges(NodeMap MIS1Incidents, NodeMap MIS2Incidents, EdgeMap downwardLink, EdgeMap upwardLink)
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |