Class DepthFirstSearcher

java.lang.Object
  |
  +--Searcher
        |
        +--DepthFirstSearcher

public class DepthFirstSearcher
extends Searcher

DepthFirstSearcher.java - a simple iterative implementation of depth-first search.


Constructor Summary
DepthFirstSearcher()
           
 
Method Summary
 boolean search(SearchNode rootNode)
          search - given an initial node, perform depth-first search (DFS).
 
Methods inherited from class Searcher
getGoalNode, getNodeCount, printGoalPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DepthFirstSearcher

public DepthFirstSearcher()
Method Detail

search

public boolean search(SearchNode rootNode)
search - given an initial node, perform depth-first search (DFS). This particular implementation of DFS is iterative.
Overrides:
search in class Searcher
Parameters:
rootNode - a SearchNode value - the initial node
Returns:
a boolean value - whether or not goal node was found