net.clackrouter.jgraph.pad
Class GPGraphTools

java.lang.Object
  extended by net.clackrouter.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(RouterGraph graph)
           
static double getLength(CellView view)
           
 java.lang.Object[] getShortestPath(RouterGraph graph, java.lang.Object from, java.lang.Object to, GPGraphTools.CostFunction cf)
          Returns the ShortestPath.
 java.lang.Object[] getSpanningTree(RouterGraph 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(RouterGraph graph)

getShortestPath

public java.lang.Object[] getShortestPath(RouterGraph 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(RouterGraph 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)