jopt.csp.spi.search.technique
Class BreadthFirstSearch

java.lang.Object
  extended byjopt.csp.spi.search.technique.BreadthFirstSearch
All Implemented Interfaces:
jopt.csp.search.SearchTechnique, TreeSearchTechnique

public class BreadthFirstSearch
extends java.lang.Object
implements TreeSearchTechnique

Implementation of a breadth-first search that loops over the search tree. In this type of search, all first-level nodes are explored, then second-level nodes, etc. As nodes are explored, their children are added to a FIFO queue nodes to be visited.


Nested Class Summary
 
Nested classes inherited from class jopt.csp.spi.search.technique.TreeSearchTechnique
TreeSearchTechnique.Move
 
Field Summary
 
Fields inherited from interface jopt.csp.spi.search.technique.TreeSearchTechnique
CHILD, JUMP, NONE, PARENT
 
Constructor Summary
BreadthFirstSearch()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 void nextMove(TreeSearchTechnique.Move move, SearchTree tree, TreeNode currentNode, boolean isRoot)
          Mutates current-move variable to return the next move to be performed in search tree
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BreadthFirstSearch

public BreadthFirstSearch()
Method Detail

nextMove

public void nextMove(TreeSearchTechnique.Move move,
                     SearchTree tree,
                     TreeNode currentNode,
                     boolean isRoot)
Description copied from interface: TreeSearchTechnique
Mutates current-move variable to return the next move to be performed in search tree

Specified by:
nextMove in interface TreeSearchTechnique
Parameters:
move - Move to store movement information in
tree - Tree that is being iterated over by search
currentNode - Current node in tree
isRoot - True if the current node is the root node
Returns:
Next move to be performed by search

equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()