|
|||||||
PREV NEXT | FRAMES NO FRAMES |
bucket1
- amount in first bucket
bucket2
- amount in second bucket
BucketsNode
instance and sets it
to an initial search state.
childClone
- returns a clone of this node that has
been made a child of this node and has a depth one greater than
this.
clone
- return a deep copy of this node.
clone
- performs a DEEP clone (copy) of this
node.
depth
- search depth; 0 at the root
search node; a child node has its parent node depth + 1.
dequeue
- remove and return the head item of the
queue.
enqueue
- insert the given item at the queue tail.
equals
- whether or not two BucketsNode objects
have the same state.
equals
method is especially useful for
repeated state detection.
expand
- return a Vector of this node's children.
expand
- return a (possibly empty) Vector of this
node's children
expand
- return a (possibly empty) Vector of this
node's children.
getGoalNode
- Returns a goal node if the previous
search was successful, and null otherwise.
getNodeCount
- Returns the number of nodes
examined (goal-checked) in the previous search.
isEmpty
- return whether or not the queue is empty
isGoal
- test whether or not the current node is a
goal node.
isGoal
- test whether or not the current node is a
goal node.
isGoal
- test whether or not the current node is a
goal node.
main
- apply a search algorithm to a root search
node
MAX_AMOUNT1
- max amount in first bucket
MAX_AMOUNT2
- max amount in second bucket
parent
- parent search node; null if and
only if node is the root of the search tree.
PegSolitaireNode
instance and sets it
to an initial search state.
printGoalPath
- If the previous search was
successful, print each node along the goal path in sequence
starting with the root node.
search
- given an initial node, perform
breadth-first search.
search
- given an initial node, perform
depth-first search (DFS).
search
- Search for a goal node starting at the
given "root" SearchNode, and return whether or not a goal node
was found.
SearchNode
instance and sets it to an
initial search state.
size
- return the number of items in the queue
test
- a random test harness that randomly
enqueues/dequeues a sequence of Integer objects, checking the
correctness of each dequeue result.
toString
- string representation of state
toString
- especially useful for debugging,
tracing search execution, reporting results, etc.
toString
- return a String representation of the
queue.
|
|||||||
PREV NEXT | FRAMES NO FRAMES |