jopt.csp.spi.search.technique
Class BreadthFirstSearch
java.lang.Object
jopt.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.
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
BreadthFirstSearch
public BreadthFirstSearch()
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 intree
- Tree that is being iterated over by searchcurrentNode
- Current node in treeisRoot
- 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()