|
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.states.StateOrdered
public class StateOrdered
Maintains the set of open states in ordered fashion, so the state with the lowest evaluation function can be removed. This straw man implementation using linked lists to store the information, thus the key operations are:
Constructor Summary | |
---|---|
StateOrdered()
Store states using double linked list. |
Method Summary | |
---|---|
INode |
contains(INode n)
Determine if contained within the set. |
void |
insert(INode n)
Insert the board state into the set. |
boolean |
isEmpty()
Is collection empty. |
java.util.Iterator<INode> |
iterator()
Return iterator to the existing board states. |
INode |
remove()
Remove board state with lowest evaluated score. |
boolean |
remove(INode n)
Remove from the set. |
int |
size()
Return the 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 StateOrdered()
Method Detail |
---|
public void insert(INode n)
insert
in interface INodeSet
n
- public boolean isEmpty()
INodeSet
isEmpty
in interface INodeSet
public int size()
INodeSet
size
in interface INodeSet
public java.util.Iterator<INode> iterator()
INodeSet
iterator
in interface INodeSet
public INode remove()
remove
in interface INodeSet
public INode contains(INode n)
An existing INode in the set that .equals(n) is selected and returned.
contains
in interface INodeSet
n
- the desired node.public boolean remove(INode n)
An existing INode in the set that .equals(n) is selected for removal.
remove
in interface INodeSet
n
- the INode to be removed from the set.
|
Algorithm Development Kit 1.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |