Constructor and Description |
---|
Stm(int size)
Constructor requires the maximum capacity to be set.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Node node)
When adding a new node to STM, the new node is added to the top of STM
with the queue cut at the bottom to keep STM to the fixed size constraints.
|
void |
clear()
Remove all items from STM.
|
int |
getCount()
Return a count of how many items are actually in the short-term memory.
|
Node |
getItem(int index)
Retrieve a node within the short-term memory by its index position.
|
int |
getSize()
Accessor for the maximum capacity.
|
java.util.Iterator<Node> |
iterator()
Support iteration over the nodes in STM.
|
boolean |
learnLateralLinks(Chrest model)
Add a lateral link indicating that the second node in this STM
is associated with the top node.
|
void |
replaceHypothesis(Node node)
Replace the topmost (hypothesis) node with the given one.
|
void |
setSize(int size)
Alter the maximum capacity.
|
public int getSize()
public void setSize(int size)
public int getCount()
public Node getItem(int index)
public void add(Node node)
public void replaceHypothesis(Node node)
public void clear()
public boolean learnLateralLinks(Chrest model)