org.jgraph.pad
Class GPGraphTools

java.lang.Object
  extended byorg.jgraph.pad.GPGraphTools

public class GPGraphTools
extends java.lang.Object


Nested Class Summary
static interface GPGraphTools.CostFunction
           
 class GPGraphTools.DefaultCostFunction
           
 class GPGraphTools.PriorityQueue
           
 class GPGraphTools.UnionFind
           
 
Constructor Summary
GPGraphTools()
           
 
Method Summary
 GPGraphTools.CostFunction createDefaultCostFunction()
           
 int getComponentCount(GPGraph graph)
           
static double getLength(CellView view)
           
 java.lang.Object[] getShortestPath(GPGraph graph, java.lang.Object from, java.lang.Object to, GPGraphTools.CostFunction cf)
          Returns the ShortestPath.
 java.lang.Object[] getSpanningTree(GPGraph graph, GPGraphTools.CostFunction cf)
          Returns the shortest spanning tree.
 java.util.SortedSet sort(JGraph graph, java.lang.Object[] cells, GPGraphTools.CostFunction cf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GPGraphTools

public GPGraphTools()
Method Detail

createDefaultCostFunction

public GPGraphTools.CostFunction createDefaultCostFunction()

getComponentCount

public int getComponentCount(GPGraph graph)

getShortestPath

public java.lang.Object[] getShortestPath(GPGraph graph,
                                          java.lang.Object from,
                                          java.lang.Object to,
                                          GPGraphTools.CostFunction cf)
Returns the ShortestPath. Implemented with the Dijkstra Algorithm


getSpanningTree

public java.lang.Object[] getSpanningTree(GPGraph graph,
                                          GPGraphTools.CostFunction cf)
Returns the shortest spanning tree. Implemented with the Kruskal Algorithm


sort

public java.util.SortedSet sort(JGraph graph,
                                java.lang.Object[] cells,
                                GPGraphTools.CostFunction cf)

getLength

public static double getLength(CellView view)