All Packages  Class Hierarchy  This Package  Previous  Next  Index

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

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

public class MST_Prim
extends Algorithm
The MST_Prim class implements the Minimum spanning tree using the Prim algorithm.

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

Variable Index

 o FINISH_VISITED_COLOR
 o FIRST_TOUCHED_COLOR
 o OTHER
 o pq
 o TREE_EDGE

Constructor Index

 o MST_Prim()
Constructor of algorithm Prim.

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 OTHER
 public static final Color OTHER
 o TREE_EDGE
 public static final Color TREE_EDGE
 o FIRST_TOUCHED_COLOR
 public static final Color FIRST_TOUCHED_COLOR
 o FINISH_VISITED_COLOR
 public static final Color FINISH_VISITED_COLOR
 o pq
 protected PriorityQueue pq

Constructors

 o MST_Prim
 public MST_Prim()
Constructor of algorithm Prim.

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 Algorithm
 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),PriorityQueue}

Parameters:
args - The list of arguments.
Throws: IllegalArgumentException
Illegal argument defined.
Overrides:
setArg 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