All Packages  Class Hierarchy  This Package  Previous  Next  Index

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

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

public class DFS
extends Algorithm
The DFS class implements the DFS algorithm.

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

Variable Index

 o BACK
 o CROSS
 o FINISH_VISITED_COLOR
 o FIRST_TOUCHED_COLOR
 o FORWARD

Constructor Index

 o DFS()
Constructor of algorithm DFS.

Method Index

 o algorImpl()
Implementation of this algorithm.
 o getPreferredDialog(Graph, Frame)
Preferred dialog: AskVertexDialog.
 o setArg(Object[])
Set arguments from the argument list.

Variables

 o BACK
 public static final Color BACK
 o FORWARD
 public static final Color FORWARD
 o CROSS
 public static final Color CROSS
 o FIRST_TOUCHED_COLOR
 public static final Color FIRST_TOUCHED_COLOR
 o FINISH_VISITED_COLOR
 public static final Color FINISH_VISITED_COLOR

Constructors

 o DFS
 public DFS()
Constructor of algorithm DFS.

Methods

 o setArg
 protected void setArg(Object args[]) throws IllegalArgumentException
Set arguments from the argument list.

Valid args: null , Object[]{Integer(int startNode)} or Object[]{Integer(int startNode),Boolean(findOtherHead)} .

findOtherHead: true if all vertices need to travel; false otherwise.

Parameters:
args - The list of arguments.
Throws: IllegalArgumentException
Illegal argument defined.
Overrides:
setArg in class Algorithm
 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 Algorithm
 o algorImpl
 protected Object algorImpl()
Implementation of this algorithm.

Returns:
the processed graph.
Overrides:
algorImpl in class Algorithm

All Packages  Class Hierarchy  This Package  Previous  Next  Index