bamboo.sim
Class GraphUtils

java.lang.Object
  extended by 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

Nested Class Summary
static class GraphUtils.Edge
           
static class GraphUtils.Node
           
 
Field Summary
protected static org.apache.log4j.Logger logger
           
 
Constructor Summary
GraphUtils()
           
 
Method Summary
static 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger
Constructor Detail

GraphUtils

public GraphUtils()
Method Detail

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.