edu.bsu.cs.algorithm
Class DepthSearch
java.lang.Object
|
+--edu.bsu.cs.algorithm.Algorithm
|
+--edu.bsu.cs.algorithm.DepthSearch
- public class DepthSearch
- extends Algorithm
An animated implementation of the Depth-First Search algorithm.
Based on original work by Bhaven Shah.
- Since:
- 27 Jan 1998
- Version:
- 1 Apr 1999
- Author:
- Aaron Nall
Methods inherited from class edu.bsu.cs.algorithm.Algorithm |
getCode, getDescription, getName, getType, setCode, setDescription, setFromResources, setName, setType, succeeded, succeeded |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DepthSearch
public DepthSearch()
DepthSearch
public DepthSearch(JavaGraph jGraph,
Vector inputs,
Vector animation)
thatDepthSearch
protected void thatDepthSearch()
depthSearch
protected void depthSearch(JavaGraph jGraph,
Vector inputs,
Vector animation)
- Called by the constructor to do all of the work
executeDepthSearch
protected void executeDepthSearch(JavaGraph jGraph,
int startVertex)
callOwnConstructor
public void callOwnConstructor(JavaGraph jGraph,
Vector inputs,
Vector animation)
- Description copied from class:
Algorithm
- This method is called by Jedit for any algorithm it executes and must be used in any working algorithm.
- Specified by:
callOwnConstructor
in class Algorithm
- Parameters:
jGraph
- the edu.bsu.cs.graph.JavaGraph that the algorithm is performed oninputs
- a Vector of inputs that consists of
- An Integer, if the algorithm uses a single vertex as a starting point
- Two Integers if the algorithm uses two vertices as starting points
- A String if the algorithm starts off of typed input
- Nothing if the algorithm runs automatically on a graph
animation
- a Vector that is filled with AnimObjects as the algorithm proceeds. It must be instantiated before this method is called.