clarion.acs.wm
Class WM

java.lang.Object
  extended byclarion.acs.wm.WM

public class WM
extends java.lang.Object


Field Summary
protected  int blaOption
          BLA option: constant or recency-based.
protected  double[] blaParams
          three parameters for BLA: c, d, iBLA.
protected  long currentTime
          current time, used for calculating BLA.
protected  boolean[] flagItemOns
          indicates the flag items is on or not.
protected  Global global
          global settings.
protected  Chunk[] items
          working memory items.
protected  int netIdx
          net index.
protected  int[] offsets
          start points of each item in overall input in terms of one dimension array.
protected  int size_WM
          size of WM.
protected  double threshold_WM
          activation threshold.
protected  short[] wmItemLengths
          the length of each WM item.
 
Constructor Summary
WM(Global g)
          constructor.
 
Method Summary
 boolean actionDoNothing()
          The process of 'do-nothing' action.
 boolean actionReset(int idx)
          The process of 'reset' action.
 boolean actionResetAll()
          The process of 'reset all' action.
 boolean actionSet(int idx, Chunk chunk)
          The process of 'set' action.
 boolean getFlagItemOn(int idx)
          Returns a specific flag item is on or not.
 Chunk[] getItems()
          Returns the working memory items.
 int getSize()
          Returns the number of items in this working memory.
 void setCurrentTime(long time)
          Sets current time.
 void updateState(double[] state)
          Updates current WM state as input to WMNet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

global

protected Global global
global settings.


netIdx

protected int netIdx
net index.


size_WM

protected int size_WM
size of WM.


threshold_WM

protected double threshold_WM
activation threshold.


blaOption

protected int blaOption
BLA option: constant or recency-based.


blaParams

protected double[] blaParams
three parameters for BLA: c, d, iBLA.


currentTime

protected long currentTime
current time, used for calculating BLA.


wmItemLengths

protected short[] wmItemLengths
the length of each WM item.


offsets

protected int[] offsets
start points of each item in overall input in terms of one dimension array.


flagItemOns

protected boolean[] flagItemOns
indicates the flag items is on or not.


items

protected Chunk[] items
working memory items.

Constructor Detail

WM

public WM(Global g)
constructor.

Parameters:
g - the global setting.
Method Detail

getSize

public int getSize()
Returns the number of items in this working memory.


getFlagItemOn

public boolean getFlagItemOn(int idx)
Returns a specific flag item is on or not.

Parameters:
idx - the index to the flag item.

getItems

public Chunk[] getItems()
Returns the working memory items.

Returns:
the working memory items.

setCurrentTime

public void setCurrentTime(long time)
Sets current time.

Parameters:
time - the time to set.

actionSet

public boolean actionSet(int idx,
                         Chunk chunk)
The process of 'set' action.

Parameters:
idx - the index to an item.
chunk - the chunk to set.

actionReset

public boolean actionReset(int idx)
The process of 'reset' action.

Parameters:
idx - the index to an item.

actionResetAll

public boolean actionResetAll()
The process of 'reset all' action.


actionDoNothing

public boolean actionDoNothing()
The process of 'do-nothing' action.


updateState

public void updateState(double[] state)
Updates current WM state as input to WMNet.

Parameters:
state - current WM state to update.