|
Algorithm Development Kit 1.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectalgs.model.searchtree.Solution
public class Solution
Records the solution for a search from an initial state to a solved goal state. In some search algorithms, the goal state is known in advance; in others, it is discovered as the search progresses. Upon a completed search, the set of moves can be recovered.
| Field Summary | |
|---|---|
INode |
goal
Goal node. |
INode |
initial
Initial node. |
| Constructor Summary | |
|---|---|
Solution(INode initial,
INode goal)
Build the solution and work backwards without a debugger. |
|
Solution(INode initial,
INode goal,
boolean success)
Build the solution and work backwards without a debugger. |
|
Solution(INode initial,
INode goal,
IDebugSearch debug)
Build the solution and work backwards with a debugger. |
|
Solution(INode initial,
INode goal,
IDebugSearch debug,
boolean success)
Build solution with success or not. |
|
| Method Summary | |
|---|---|
DoubleLinkedList<IMove> |
moves()
Sequence of moves that achieve the goalState. |
int |
numMoves()
Number of moves in the solution. |
boolean |
succeeded()
Was this a successful solution? |
java.lang.String |
toString()
Return solution as a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final INode initial
public final INode goal
| Constructor Detail |
|---|
public Solution(INode initial,
INode goal,
IDebugSearch debug)
initial - initial stategoal - final statedebug - entity to help generate debug output
public Solution(INode initial,
INode goal)
initial - initial stategoal - final state
public Solution(INode initial,
INode goal,
boolean success)
initial - initial stategoal - final statesuccess - was this a successful search?
public Solution(INode initial,
INode goal,
IDebugSearch debug,
boolean success)
initial - initial stategoal - final statedebug - entity to help generate debug outputsuccess - was this a successful search?| Method Detail |
|---|
public DoubleLinkedList<IMove> moves()
public boolean succeeded()
public int numMoves()
public java.lang.String toString()
toString in class java.lang.Object
|
Algorithm Development Kit 1.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||