org.jactr.core.buffer
Interface IActivationBuffer

All Superinterfaces:
IInitializable
All Known Subinterfaces:
IAuralActivationBuffer, IAuralLocationBuffer, ICapacityBuffer, ICompilableBuffer, IDelegatedRequestableBuffer, IEventTrackingActivationBuffer, IMotorActivationBuffer, IPerceptualBuffer, IRequestableBuffer, IStatusBuffer, IVisualActivationBuffer, IVisualLocationBuffer, IVocalActivationBuffer
All Known Implementing Classes:
AbstractActivationBuffer, AbstractActivationBuffer6, AbstractCapacityBuffer6, AbstractCapacityPMActivationBuffer6, AbstractPMActivationBuffer6, AbstractRequestableBuffer6, BasicBuffer6, DefaultAuralActivationBuffer, DefaultAuralLocationBuffer, DefaultDelegatedRequestableBuffer6, DefaultGoalBuffer6, DefaultImaginalBuffer, DefaultMotorActivationBuffer6, DefaultRetrievalBuffer6, DefaultVisualActivationBuffer6, DefaultVisualLocationBuffer6, DefaultVocalActivationBuffer6

public interface IActivationBuffer
extends IInitializable

Represents a general case buffer in a model. Most buffers are already defined (goal, retrieval, and the RPM buffers) it is rare that a buffer will be added - but the capacity is necessary. Buffers are also the only source of external activation to be propogated to its contents.

Author:
harrison

Field Summary
static java.lang.String AURAL
          Description of the Field
static java.lang.String AURAL_LOCATION
          Description of the Field
static java.lang.String GOAL
           
static java.lang.String IMAGINAL
           
static java.lang.String MOTOR
          Description of the Field
static java.lang.String RETRIEVAL
          Description of the Field
static java.lang.String VISUAL
          Description of the Field
static java.lang.String VISUAL_LOCATION
          Description of the Field
static java.lang.String VOCAL
           
 
Method Summary
 void addListener(IActivationBufferListener abl, java.util.concurrent.Executor executor)
          add a buffer listener
 IChunk addSourceChunk(IChunk c)
          add a chunk to the buffer.
 void clear()
          flush the contents of the buffer and notify any listeners
 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
 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.
 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 a chunk from the buffer, and notify listeners
 void setActivation(double activation)
          Set the value of the spreading activation.
 void setG(double g)
          set the goal value of this buffer..
 
Methods inherited from interface org.jactr.core.utils.IInitializable
initialize
 

Field Detail

GOAL

static final java.lang.String GOAL
See Also:
Constant Field Values

IMAGINAL

static final java.lang.String IMAGINAL
See Also:
Constant Field Values

RETRIEVAL

static final java.lang.String RETRIEVAL
Description of the Field

See Also:
Constant Field Values

VISUAL

static final java.lang.String VISUAL
Description of the Field

See Also:
Constant Field Values

VISUAL_LOCATION

static final java.lang.String VISUAL_LOCATION
Description of the Field

See Also:
Constant Field Values

AURAL

static final java.lang.String AURAL
Description of the Field

See Also:
Constant Field Values

AURAL_LOCATION

static final java.lang.String AURAL_LOCATION
Description of the Field

See Also:
Constant Field Values

MOTOR

static final java.lang.String MOTOR
Description of the Field

See Also:
Constant Field Values

VOCAL

static final java.lang.String VOCAL
See Also:
Constant Field Values
Method Detail

matched

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.

Parameters:
chunk -

setActivation

void setActivation(double activation)
Set the value of the spreading activation. The source chunk will have this value applied to it and propogated to its contained chunks (contained the source chunk?s slots). Note: the specific behavior of this is not fully defined. Multiple capacity buffers might not implement an all or nothing contract and instead might distribute activation across chunks equally or by some other means.

Parameters:
activation - 0.0 to deactivate

getActivation

double getActivation()
return the activation of the buffer

Returns:
The activation value

setG

void setG(double g)
set the goal value of this buffer.. only used for the goal buffer at present

Parameters:
g - The new g value

getG

double getG()
return the goal value of this buffer.

Returns:
The g value

clear

void clear()
flush the contents of the buffer and notify any listeners

See Also:
IActivationBufferListener

addSourceChunk

IChunk addSourceChunk(IChunk c)
add a chunk to the buffer. If the buffer's contents are constrained (and they should be) it will call removeSourceChunk as necessary listeners will be notified

Parameters:
c - chunk to be added
Returns:
the actual chunk added (in case a copy was made)
See Also:
removeSourceChunk(IChunk), IActivationBufferListener

removeSourceChunk

void removeSourceChunk(IChunk c)
remove a chunk from the buffer, and notify listeners

See Also:
IActivationBufferListener

getSourceChunk

IChunk getSourceChunk()
return a chunk from the buffer - the exact behavior is specified by the particular buffer


getSourceChunks

java.util.Collection<IChunk> getSourceChunks()
return all the chunks in the buffer


contains

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. For exact equality, use #getSourceChunks()#contains(IChunk)

See Also:
IChunk.equalsSymbolic(IChunk)

addListener

void addListener(IActivationBufferListener abl,
                 java.util.concurrent.Executor executor)
add a buffer listener


removeListener

void removeListener(IActivationBufferListener abl)
remove a buffer listener


getName

java.lang.String getName()
return the buffer's name

Returns:
The name value

getModel

IModel getModel()

handlesEncoding

boolean handlesEncoding()
returns true if this buffer is responsible for handling the encoding of chunks that are in it. otherwise, the model will encode at removeSourceChunk

Returns:

getModule

IModule getModule()
return the module that controls this buffer

Returns:

dispose

void dispose()
clean up resources, called by the module that created the buffer


isStrictHarvestingEnabled

boolean isStrictHarvestingEnabled()
strict harvesting forces the removal of buffer content that is matched against in the LHS, but not acted upon in the RHS. The buffer is not actually responsible for enforcing strict harvesting. see DefaultProceduralModule6

Returns: