gishur.graph.algorithms
Class BellmanFord

java.lang.Object
  |
  +--gishur.graph.algorithms.BellmanFord

public class BellmanFord
extends java.lang.Object

An implementation of the Single Source Shortest Paths problem using the Dijkstra algorithm via a TraverseAlgorithmCursor. The Algorithm sets the following node properties: _prefix+".distance" _prefix+".predecessor" _prefix+".color" _cost (default == 0!!) _prefix+".pred" Edge property to indicate, that this edge is element of the predecessor subtree

Version:
1.0
Author:
Simon Weidmann

Field Summary
static int BELLMAN_COLOR_GRAY
           
static int BELLMAN_COLOR_GREEN
           
static int BELLMAN_COLOR_RED
           
static int BELLMAN_COLOR_WHITE
           
static int BELLMAN_STEP
          Trace label constant indicating that the algorithm has made one step forward.
 
Constructor Summary
BellmanFord(Graph G, java.lang.String cost, Node source)
           
BellmanFord(Graph G, java.lang.String cost, Node source, boolean pred, java.lang.String mark_prefix, Tracer tracer)
           
 
Method Summary
 void sssp()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BELLMAN_COLOR_WHITE

public static final int BELLMAN_COLOR_WHITE

BELLMAN_COLOR_GRAY

public static final int BELLMAN_COLOR_GRAY

BELLMAN_COLOR_RED

public static final int BELLMAN_COLOR_RED

BELLMAN_COLOR_GREEN

public static final int BELLMAN_COLOR_GREEN

BELLMAN_STEP

public static final int BELLMAN_STEP
Trace label constant indicating that the algorithm has made one step forward.
Constructor Detail

BellmanFord

public BellmanFord(Graph G,
                   java.lang.String cost,
                   Node source)

BellmanFord

public BellmanFord(Graph G,
                   java.lang.String cost,
                   Node source,
                   boolean pred,
                   java.lang.String mark_prefix,
                   Tracer tracer)
Method Detail

sssp

public void sssp()