Orbital library

orbital.algorithm.template
Class DepthFirstSearch.OptionIterator

java.lang.Object
  extended by orbital.algorithm.template.GeneralSearch.OptionIterator
      extended by orbital.algorithm.template.DepthFirstSearch.OptionIterator
All Implemented Interfaces:
java.io.Serializable, java.util.Iterator
Direct Known Subclasses:
IterativeBroadening.OptionIterator
Enclosing class:
DepthFirstSearch

public static class DepthFirstSearch.OptionIterator
extends GeneralSearch.OptionIterator

An iterator over a state space in depth-first order.

Author:
André Platzer
See Also:
Serialized Form

Constructor Summary
DepthFirstSearch.OptionIterator(GeneralSearchProblem problem)
           
 
Method Summary
protected  boolean add(java.util.Iterator newNodes)
          Concatenate the new nodes and the old nodes.
protected  boolean isEmpty()
          Returns true if this iterator's collection of nodes currently does not contain any elements.
protected  java.lang.Object select()
          Selects an option to visit from nodes.
 
Methods inherited from class orbital.algorithm.template.GeneralSearch.OptionIterator
getProblem, hasNext, next, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DepthFirstSearch.OptionIterator

public DepthFirstSearch.OptionIterator(GeneralSearchProblem problem)
Method Detail

isEmpty

protected boolean isEmpty()
Description copied from class: GeneralSearch.OptionIterator
Returns true if this iterator's collection of nodes currently does not contain any elements.

Specified by:
isEmpty in class GeneralSearch.OptionIterator
Returns:
true if this collection contains no elements.

select

protected java.lang.Object select()
Description copied from class: GeneralSearch.OptionIterator
Selects an option to visit from nodes.

Specified by:
select in class GeneralSearch.OptionIterator
Returns:
the selected option after removing it from nodes.

add

protected boolean add(java.util.Iterator newNodes)
Description copied from class: GeneralSearch.OptionIterator
Concatenate the new nodes and the old nodes. Concatenates by some algorithm-dependant means.

Specified by:
add in class GeneralSearch.OptionIterator
Parameters:
newNodes - the new nodes we apparently became aware of. (Might be modified by this method).
Returns:
true if nodes changed as a result of the call.

Orbital library
1.3.0: 11 Apr 2009

Copyright © 1996-2009 André Platzer
All Rights Reserved.