|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjchrest.architecture.Stm
public class Stm
Class manages the short-term memory for one modality of a Chrest model. Each short-term memory has a maximum capacity, and stores a list of nodes.
Constructor Summary | |
---|---|
Stm(int size)
Constructor requires the maximum capacity to be set. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Stm(int size)
Method Detail |
---|
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)
public java.util.Iterator<Node> iterator()
iterator
in interface java.lang.Iterable<Node>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |