All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tw.edu.ncnu.im.cnclab.Algor.ShortestPath_BellmanFord

java.lang.Object
   |
   +----tw.edu.ncnu.im.cnclab.Algor.Algorithm
           |
           +----tw.edu.ncnu.im.cnclab.Algor.ShortestPath
                   |
                   +----tw.edu.ncnu.im.cnclab.Algor.ShortestPath_BellmanFord

public class ShortestPath_BellmanFord
extends ShortestPath
The abstract ShortestPath_BellmanFord class implements the Shortest path by using Bellman Ford algorithm.

Version:
0.4 Jul 8, 1999
Author:
Ding-Yi Chen

Variable Index

 o drawNegativeLoop
 o NEGATIVE

Constructor Index

 o ShortestPath_BellmanFord()
Constructor of algorithm Bellman-Ford.

Method Index

 o algorImpl()
Algorithm implement here.
 o findNegativeLoop(Graph, Vertex)
 o getPreferredDialog(Graph, Frame)
Preferred dialog: AskVertexDialog.
 o isNegativeLoop(Graph)

Variables

 o NEGATIVE
 public static final Color NEGATIVE
 o drawNegativeLoop
 protected boolean drawNegativeLoop

Constructors

 o ShortestPath_BellmanFord
 public ShortestPath_BellmanFord()
Constructor of algorithm Bellman-Ford.

Methods

 o getPreferredDialog
 public GenericDialog getPreferredDialog(Graph graph,
                                         Frame fr)
Preferred dialog: AskVertexDialog.

Parameters:
graph - The Graph.
fr - The parent Frame.
Returns:
the preferred dialog.
Overrides:
getPreferredDialog in class ShortestPath
 o findNegativeLoop
 public void findNegativeLoop(Graph graph,
                              Vertex v)
 o isNegativeLoop
 public boolean isNegativeLoop(Graph graph)
 o algorImpl
 protected Object algorImpl() throws InvalidGraphTypeException, AlgorithmException
Algorithm implement here.

Returns:
the result of the algorithm.
Throws: AlgorithmException
Exception that throws by algorithm.
Throws: InvalidGraphTypeException
Thown if graph of invalid type is given.
Overrides:
algorImpl in class ShortestPath

All Packages  Class Hierarchy  This Package  Previous  Next  Index