public class BreadthFirstStrategy extends java.lang.Object implements IStrategy
Constructor and Description |
---|
BreadthFirstStrategy()
Creates a new breadth-first search algorithm without depth limit.
|
BreadthFirstStrategy(int maxDepth)
Creates a new breadth-first search algorithm with depth limit.
|
Modifier and Type | Method and Description |
---|---|
void |
explore()
This method explores the design space as the implementation specifies.
|
void |
initStrategy(ThreadContext context)
Initializes the strategy with a specific
ThreadContext . |
void |
interruptStrategy()
The implementation of this interface should be ready to be interrupted.
|
public BreadthFirstStrategy()
public BreadthFirstStrategy(int maxDepth)
maxDepth
- A negative maxDepth
means no depth limit, zero means the checking of the initial state.public void initStrategy(ThreadContext context)
IStrategy
ThreadContext
.initStrategy
in interface IStrategy
context
- The context.public void explore()
IStrategy
public void interruptStrategy()
IStrategy
IStrategy.explore()
method should return ASAP.
This method is also called by the SolutionStore
class if enough solutions are found.interruptStrategy
in interface IStrategy