|
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.ClosedStates
public class ClosedStates
Maintains the set of closed states in ordered fashion, so the state with the lowest evaluation function can be removed.
| Constructor Summary | |
|---|---|
ClosedStates()
|
|
| Method Summary | |
|---|---|
INode |
contains(INode n)
Determine if the given state is contained. |
void |
insert(INode n)
Insert the board state into the openStates. |
boolean |
isEmpty()
Determine if open states is empty. |
java.util.Iterator<INode> |
iterator()
Expose iterator to internal board states. |
INode |
remove()
Not expected to be called since this is the closed list. |
boolean |
remove(INode n)
Remove node from node set. |
int |
removeIfLowerScore(INode state)
Remove state from list if its score is less than the score of the state as it exists within list. |
int |
size()
Determine number of states in the set. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClosedStates()
| Method Detail |
|---|
public int removeIfLowerScore(INode state)
state - public INode contains(INode n)
Returns the actual node as stored in the list (which may store additional storedData). Uses .equals as the comparator method.
contains in interface INodeSetn - public void insert(INode n)
insert in interface INodeSetn - public boolean isEmpty()
isEmpty in interface INodeSetpublic int size()
size in interface INodeSetpublic java.util.Iterator<INode> iterator()
iterator in interface INodeSetiterator in interface java.lang.Iterable<INode>public INode remove()
remove in interface INodeSetpublic boolean remove(INode n)
INodeSetThe parameter is either an actual node in the node set or a copy of one of its nodes.
remove in interface INodeSetn - Board state to be removed
|
Algorithm Development Kit 1.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||