net.clackrouter.jgraph.pad
Class GPGraphTools
java.lang.Object
net.clackrouter.jgraph.pad.GPGraphTools
public class GPGraphTools
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GPGraphTools
public GPGraphTools()
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)