de.rwth.graph
Class SwappedGraph

java.lang.Object
  |
  +--de.rwth.graph.Graph
        |
        +--de.rwth.graph.RootedGraph
              |
              +--de.rwth.graph.SwappedGraph

public class SwappedGraph
extends RootedGraph

This class transforms a given RootedGraph into a RootedGraph where the nodes becomes edges and vice versa.

Version:
$Id: SwappedGraph.java,v 1.2 2002/09/17 06:53:53 mohnen Exp $
Author:
Markus Mohnen, Mario Joußen <joussen@i2.informatik.rwth-aachen.de>

Inner classes inherited from class de.rwth.graph.RootedGraph
RootedGraph.Node
 
Inner classes inherited from class de.rwth.graph.Graph
Graph.Node, Graph.NodeDyer
 
Fields inherited from class de.rwth.graph.RootedGraph
leafs, roots
 
Fields inherited from class de.rwth.graph.Graph
curNumber, label, nodes, sizeEdges
 
Constructor Summary
SwappedGraph(RootedGraph graph)
          Constructs a new SwappedGraph by transforming the given graph.
 
Method Summary
 void swapBack()
          Copies the labels of the nodes and edges of the swapped graph back to the original graph.
 
Methods inherited from class de.rwth.graph.RootedGraph
addLeaf, addRoot, getLeafArray, getLeafs, getRootArray, getRoots, isLeaf, isRoot, removeLeaf, removeRoot
 
Methods inherited from class de.rwth.graph.Graph
getLabel, getNodes, main, setLabel, sizeEdges, sizeNodes, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SwappedGraph

public SwappedGraph(RootedGraph graph)
Constructs a new SwappedGraph by transforming the given graph.
Parameters:
graph - the graph which should be transformed.
Method Detail

swapBack

public void swapBack()
Copies the labels of the nodes and edges of the swapped graph back to the original graph.