|
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.GeneralBoundingSearch
public abstract class GeneralBoundingSearch
Abstract general bounding search scheme.
A general search that only executes up to a specified bound (which might as well vary during search).
Nested Class Summary |
---|
Nested classes/interfaces inherited from class orbital.algorithm.template.GeneralSearch |
---|
GeneralSearch.OptionIterator |
Nested classes/interfaces inherited from interface orbital.algorithm.template.EvaluativeAlgorithm |
---|
EvaluativeAlgorithm.EvaluationComparator |
Nested classes/interfaces inherited from interface orbital.algorithm.template.AlgorithmicTemplate |
---|
AlgorithmicTemplate.Configuration |
Constructor Summary | |
---|---|
GeneralBoundingSearch()
|
Method Summary | |
---|---|
protected Real |
getBound()
Get the current bound. |
protected boolean |
isContinuedWhenFound()
Whether the search is continued after a solution is found. |
protected boolean |
isOutOfBounds(java.lang.Object node)
Whether a node is out of bounds. |
protected java.lang.Object |
processSolution(java.lang.Object node)
Process a solution. |
protected java.lang.Object |
search(java.util.Iterator nodes)
Run the general search algorithm scheme. |
protected void |
setBound(double bound)
Deprecated. Since Orbital1.1 use setBound(Real) instead. |
protected void |
setBound(Real bound)
Set the current bound. |
protected void |
setContinuedWhenFound(boolean continuedWhenFound)
Set whether the search should continue after a solution is found. |
Methods inherited from class orbital.algorithm.template.GeneralSearch |
---|
createTraversal, getProblem, isOptimal, solve, solveImpl |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface orbital.algorithm.template.EvaluativeAlgorithm |
---|
getEvaluation |
Methods inherited from interface orbital.algorithm.template.AlgorithmicTemplate |
---|
complexity, solve, spaceComplexity |
Constructor Detail |
---|
public GeneralBoundingSearch()
Method Detail |
---|
protected Real getBound()
isOutOfBounds(Object)
protected void setBound(Real bound)
protected void setBound(double bound)
setBound(Real)
instead.
protected boolean isContinuedWhenFound()
protected void setContinuedWhenFound(boolean continuedWhenFound)
continueWhenFound
- whether to continue searching for even better solutions
when a solution is already found.
Subclasses should set it to false
if they are assuming that
the first solution found is already the best one,
which cannot be guaranteed for all algorithms.
Set to true
if the search should continue (perhaps after bounding) to find
even better solutions.protected java.lang.Object processSolution(java.lang.Object node)
The default implementation simply returns the solution node description. Overwrite to get more sophisticated behaviour.
node
- the node describing the solution.
protected boolean isOutOfBounds(java.lang.Object node)
Called to check whether to prune a node. This implementation checks whether f(n) > bound. Overwrite to get additional behaviour.
node
- the node to check.
getBound()
,
Template Methodprotected java.lang.Object search(java.util.Iterator nodes)
This method only needs to be overwritten to provide a completely different search scheme. Usually, the default search algorithm scheme is sufficient.
search
in class GeneralSearch
nodes
- is the iterator over the nodes to visit (sometimes called open set)
which determines the traversal order.
|
Orbital library 1.3.0: 11 Apr 2009 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |