|
Orbital library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object orbital.algorithm.template.GeneralSearch orbital.algorithm.template.BreadthFirstSearch
public class BreadthFirstSearch
BreadthFirstSearch class (BrFS). A blind search algorithm.
Expands shallowest nodes first.
BrFS is complete, optimal for uniform costs, and has a time and space complexity of O(bd).
Implementation data structure is a Queue (FIFO).
Nested Class Summary | |
---|---|
static class |
BreadthFirstSearch.OptionIterator
An iterator over a state space in breadth-first order. |
Nested classes/interfaces inherited from interface orbital.algorithm.template.AlgorithmicTemplate |
---|
AlgorithmicTemplate.Configuration |
Constructor Summary | |
---|---|
BreadthFirstSearch()
|
Method Summary | |
---|---|
Function |
complexity()
O(bd) where b is the branching factor and d the solution depth. |
protected java.util.Iterator |
createTraversal(GeneralSearchProblem problem)
Define a traversal order by creating an iterator for the problem's state space. |
boolean |
isOptimal()
Optimal only for when costs are uniform. |
Function |
spaceComplexity()
O(bd) where b is the branching factor and d the solution depth. |
Methods inherited from class orbital.algorithm.template.GeneralSearch |
---|
getProblem, search, solve, solveImpl |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BreadthFirstSearch()
Method Detail |
---|
public Function complexity()
AlgorithmicTemplate.solve(AlgorithmicProblem)
public Function spaceComplexity()
AlgorithmicTemplate.solve(AlgorithmicProblem)
public boolean isOptimal()
isOptimal
in class GeneralSearch
protected java.util.Iterator createTraversal(GeneralSearchProblem problem)
GeneralSearch
Lays a linear order through the state space which the search can simply follow sequentially. Thus a traversal policy effectively reduces a search problem through a graph to a search problem through a linear sequence of states. Of course, the mere notion of a traversal policy does not yet solve the task of finding a good order of states, but only encapsulate it. Complete search algorithms result from traversal policies that have a linear sequence through the whole state space.
createTraversal
in class GeneralSearch
problem
- the problem whose state space to create a traversal iterator for.
GeneralSearch.OptionIterator
|
Orbital library 1.3.0: 11 Apr 2009 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |