org.makumba.commons
Class GraphTS

java.lang.Object
  extended by org.makumba.commons.GraphTS

public class GraphTS
extends Object

Graph which can do a topological sort of its elements. In our case, the elements are MultipleKeys of form tags.

Version:
$Id: GraphTS.java 5153 2010-05-18 21:37:50Z rosso_nero $
Author:
http://www.java2s.com/Code/Java/Collections-Data-Structure/Topologicalsorting.htm, Manuel Gay

Constructor Summary
GraphTS()
           
 
Method Summary
 void addEdge(int start, int end)
           
 void addVertex(char lab)
           
 int addVertex(MultipleKey tagKey)
           
 void deleteVertex(int delVert)
           
 void displayVertex(int v)
           
 MultipleKey[] getSortedKeys()
           
static void main(String[] args)
           
 int noSuccessors()
           
 void topo()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphTS

public GraphTS()
Method Detail

addVertex

public void addVertex(char lab)

addVertex

public int addVertex(MultipleKey tagKey)

addEdge

public void addEdge(int start,
                    int end)

displayVertex

public void displayVertex(int v)

getSortedKeys

public MultipleKey[] getSortedKeys()

topo

public void topo()

noSuccessors

public int noSuccessors()

deleteVertex

public void deleteVertex(int delVert)

main

public static void main(String[] args)