|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jactr.core.buffer.AbstractActivationBuffer
public abstract class AbstractActivationBuffer
basic implementation of an activation buffer that handles the spreading of activation to chunks. this is thread safe.
| Field Summary | |
|---|---|
static java.lang.String |
ACTIVATION
Comment for ACTIVATION |
static java.lang.String |
GOAL_VALUE
Comment for GOAL_VALUE |
static java.lang.String |
STRICT_HARVESTING_PARAM
|
| Fields inherited from interface org.jactr.core.buffer.IActivationBuffer |
|---|
AURAL, AURAL_LOCATION, GOAL, IMAGINAL, MOTOR, RETRIEVAL, VISUAL, VISUAL_LOCATION, VOCAL |
| Constructor Summary | |
|---|---|
AbstractActivationBuffer(java.lang.String name,
IModel model,
IModule module)
|
|
| Method Summary | |
|---|---|
void |
addListener(IActivationBufferListener abl,
java.util.concurrent.Executor executor)
add a buffer listener |
IChunk |
addSourceChunk(IChunk c)
add chunk to the buffer. |
void |
clear()
will call removeSourceChunkInternal for all the chunks and then recalculate activation |
IChunk |
contains(IChunk c)
returns the buffer's source chunk that is symbolically equal to c, or null if none is available or symbolically equal. |
void |
dispose()
clean up resources, called by the module that created the buffer |
double |
getActivation()
return the activation of the buffer |
double |
getG()
return the goal value of this buffer. |
IModel |
getModel()
|
IModule |
getModule()
return the module that controls this buffer |
java.lang.String |
getName()
return the buffer's name |
java.lang.String |
getParameter(java.lang.String parameter)
return parameter value - null if not defined. |
java.util.Collection<java.lang.String> |
getPossibleParameters()
Return all parameters that can be read |
java.util.Collection<java.lang.String> |
getSetableParameters()
Return list of all parameters that can be set. |
IChunk |
getSourceChunk()
return a chunk from the buffer - the exact behavior is specified by the particular buffer |
java.util.Collection<IChunk> |
getSourceChunks()
return all the chunks in the buffer |
boolean |
handlesEncoding()
returns true if this buffer is responsible for handling the encoding of chunks that are in it. |
void |
initialize()
intialize this component |
boolean |
isStrictHarvestingEnabled()
strict harvesting forces the removal of buffer content that is matched against in the LHS, but not acted upon in the RHS. |
void |
matched(IChunk chunk)
called from within an instantiation notifying the buffer that this chunk has been matched in the production that is about to fire. |
void |
removeListener(IActivationBufferListener abl)
remove a buffer listener |
void |
removeSourceChunk(IChunk c)
remove the chunk from the buffer. |
void |
setActivation(double activation)
Set the value of the spreading activation. |
void |
setG(double g)
set the goal value of this buffer.. |
void |
setParameter(java.lang.String parameter,
java.lang.String value)
Set the named parameter |
void |
setStrictHarvestingEnabled(boolean enabled)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ACTIVATION
ACTIVATION
public static final java.lang.String GOAL_VALUE
GOAL_VALUE
public static final java.lang.String STRICT_HARVESTING_PARAM
| Constructor Detail |
|---|
public AbstractActivationBuffer(java.lang.String name,
IModel model,
IModule module)
| Method Detail |
|---|
public void dispose()
IActivationBuffer
dispose in interface IActivationBufferpublic void matched(IChunk chunk)
IActivationBuffer
matched in interface IActivationBufferpublic final void setActivation(double activation)
IActivationBuffer
setActivation in interface IActivationBufferactivation - 0.0 to deactivatepublic final double getActivation()
IActivationBuffer
getActivation in interface IActivationBufferpublic final void setG(double g)
IActivationBuffer
setG in interface IActivationBufferg - The new g valuepublic final double getG()
IActivationBuffer
getG in interface IActivationBufferpublic final void setStrictHarvestingEnabled(boolean enabled)
public final boolean isStrictHarvestingEnabled()
IActivationBufferDefaultProceduralModule6
isStrictHarvestingEnabled in interface IActivationBufferpublic void clear()
clear in interface IActivationBufferIActivationBuffer.clear()public IChunk addSourceChunk(IChunk c)
addSourceChunk in interface IActivationBufferc - chunk to be added
IActivationBuffer.addSourceChunk(org.jactr.core.chunk.IChunk)public void removeSourceChunk(IChunk c)
removeSourceChunk in interface IActivationBufferIActivationBuffer.removeSourceChunk(org.jactr.core.chunk.IChunk)public final IChunk getSourceChunk()
IActivationBuffer
getSourceChunk in interface IActivationBufferpublic final java.util.Collection<IChunk> getSourceChunks()
IActivationBuffer
getSourceChunks in interface IActivationBufferpublic IChunk contains(IChunk c)
IActivationBuffer#getSourceChunks()#contains(IChunk)
contains in interface IActivationBufferIChunk.equalsSymbolic(IChunk)
public void addListener(IActivationBufferListener abl,
java.util.concurrent.Executor executor)
IActivationBuffer
addListener in interface IActivationBufferpublic void removeListener(IActivationBufferListener abl)
IActivationBuffer
removeListener in interface IActivationBufferpublic java.lang.String getName()
IActivationBuffer
getName in interface IActivationBufferpublic IModel getModel()
getModel in interface IActivationBufferpublic boolean handlesEncoding()
IActivationBuffer
handlesEncoding in interface IActivationBufferpublic IModule getModule()
IActivationBuffer
getModule in interface IActivationBufferpublic java.util.Collection<java.lang.String> getSetableParameters()
IParameterized
getSetableParameters in interface IParameterizedIParameterized.getSetableParameters()public java.util.Collection<java.lang.String> getPossibleParameters()
IParameterized
getPossibleParameters in interface IParameterizedIParameterized.getPossibleParameters()public java.lang.String getParameter(java.lang.String parameter)
IParameterized
getParameter in interface IParameterizedparameter -
IParameterized.getParameter(java.lang.String)
public void setParameter(java.lang.String parameter,
java.lang.String value)
IParameterized
setParameter in interface IParameterizedparameter - value - IParameterized.setParameter(java.lang.String,
String)public void initialize()
IInitializable
initialize in interface IInitializable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||