bamboo.sim
Class GraphUtils
java.lang.Object
bamboo.sim.GraphUtils
public class GraphUtils
- extends Object
A simple implementation of Dijkstra's shortest-path algorithm.
- Version:
- $Id: GraphUtils.java,v 1.2 2003/12/20 22:49:25 srhea Exp $
- Author:
- Sean C. Rhea
|
Field Summary |
protected static org.apache.log4j.Logger |
logger
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static org.apache.log4j.Logger logger
GraphUtils
public GraphUtils()
dijkstra
public static final void dijkstra(GraphUtils.Node[] G,
GraphUtils.Node[] pred,
long[] dist,
GraphUtils.Node src,
GraphUtils.Node dst)
- Compute the shortest paths from
src to dst,
or if dst==null, to all nodes in G.