edu.memphis.ccrg.lida.workspace.structurebuildingcodelets
Class StructureBuildingCodeletImpl

java.lang.Object
  extended by edu.memphis.ccrg.lida.framework.initialization.InitializableImpl
      extended by edu.memphis.ccrg.lida.framework.shared.activation.ActivatibleImpl
          extended by edu.memphis.ccrg.lida.framework.shared.activation.LearnableImpl
              extended by edu.memphis.ccrg.lida.framework.tasks.FrameworkTaskImpl
                  extended by edu.memphis.ccrg.lida.framework.tasks.CodeletImpl
                      extended by edu.memphis.ccrg.lida.workspace.structurebuildingcodelets.StructureBuildingCodeletImpl
All Implemented Interfaces:
FullyInitializable, Initializable, Activatible, Learnable, Codelet, FrameworkTask, StructureBuildingCodelet, java.util.concurrent.Callable<FrameworkTask>
Direct Known Subclasses:
BasicStructureBuildingCodelet

public abstract class StructureBuildingCodeletImpl
extends CodeletImpl
implements StructureBuildingCodelet

Basic implementation of StructureBuildingCodelet

Author:
Ryan J. McCall

Field Summary
protected  java.util.Map<ModuleName,WorkspaceBuffer> readableBuffers
          Map of workspace buffers this codelet reads from.
protected  java.lang.Object runResults
          Expected results of this codelets
protected  WorkspaceBuffer writableBuffer
          WorkspaceBuffer to be written to.
 
Fields inherited from class edu.memphis.ccrg.lida.framework.tasks.CodeletImpl
soughtContent
 
Fields inherited from class edu.memphis.ccrg.lida.framework.tasks.FrameworkTaskImpl
status
 
Fields inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Learnable
DEFAULT_BASE_LEVEL_ACTIVATION, DEFAULT_LEARNABLE_REMOVAL_THRESHOLD
 
Fields inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Activatible
DEFAULT_ACTIVATIBLE_REMOVAL_THRESHOLD, DEFAULT_ACTIVATION
 
Constructor Summary
StructureBuildingCodeletImpl()
          Default Constructor
 
Method Summary
 java.lang.Object getCodeletRunResult()
          Returns result of codelet's run
 void reset()
          Clears this codelet's fields in preparation for reuse.
protected abstract  void runThisFrameworkTask()
          To be overridden by extending classes.
 void setAssociatedModule(FrameworkModule module, java.lang.String usage)
          Subclasses may override this method.
 
Methods inherited from class edu.memphis.ccrg.lida.framework.tasks.CodeletImpl
getSoughtContent, setSoughtContent
 
Methods inherited from class edu.memphis.ccrg.lida.framework.tasks.FrameworkTaskImpl
call, cancel, equals, getControllingTaskSpawner, getNextTicksPerRun, getScheduledTick, getTaskId, getTaskStatus, getTicksPerRun, hashCode, setControllingTaskSpawner, setNextTicksPerRun, setScheduledTick, setTaskStatus, setTicksPerRun, stopRunning, toString
 
Methods inherited from class edu.memphis.ccrg.lida.framework.shared.activation.LearnableImpl
decay, decayBaseLevelActivation, getBaseLevelActivation, getBaseLevelDecayStrategy, getBaseLevelExciteStrategy, getLearnableRemovalThreshold, getTotalActivation, getTotalActivationStrategy, init, isRemovable, reinforceBaseLevelActivation, setBaseLevelActivation, setBaseLevelDecayStrategy, setBaseLevelExciteStrategy, setBaseLevelRemovalThreshold, setTotalActivationStrategy
 
Methods inherited from class edu.memphis.ccrg.lida.framework.shared.activation.ActivatibleImpl
excite, getActivatibleRemovalThreshold, getActivation, getDecayStrategy, getExciteStrategy, setActivatibleRemovalThreshold, setActivation, setDecayStrategy, setExciteStrategy
 
Methods inherited from class edu.memphis.ccrg.lida.framework.initialization.InitializableImpl
containsParameter, getParam, getParameters, init
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.tasks.Codelet
bufferContainsSoughtContent, getSoughtContent, retrieveWorkspaceContent, setSoughtContent
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.tasks.FrameworkTask
cancel, getControllingTaskSpawner, getNextTicksPerRun, getScheduledTick, getTaskId, getTaskStatus, getTicksPerRun, setControllingTaskSpawner, setNextTicksPerRun, setScheduledTick, setTaskStatus, setTicksPerRun, stopRunning
 
Methods inherited from interface java.util.concurrent.Callable
call
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Learnable
decayBaseLevelActivation, getBaseLevelActivation, getBaseLevelDecayStrategy, getBaseLevelExciteStrategy, getLearnableRemovalThreshold, getTotalActivationStrategy, reinforceBaseLevelActivation, setBaseLevelActivation, setBaseLevelDecayStrategy, setBaseLevelExciteStrategy, setBaseLevelRemovalThreshold, setTotalActivationStrategy
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.shared.activation.Activatible
decay, excite, getActivatibleRemovalThreshold, getActivation, getDecayStrategy, getExciteStrategy, getTotalActivation, isRemovable, setActivatibleRemovalThreshold, setActivation, setDecayStrategy, setExciteStrategy
 
Methods inherited from interface edu.memphis.ccrg.lida.framework.initialization.Initializable
containsParameter, getParam, getParameters, init, init
 

Field Detail

readableBuffers

protected java.util.Map<ModuleName,WorkspaceBuffer> readableBuffers
Map of workspace buffers this codelet reads from.


writableBuffer

protected WorkspaceBuffer writableBuffer
WorkspaceBuffer to be written to.


runResults

protected java.lang.Object runResults
Expected results of this codelets

Constructor Detail

StructureBuildingCodeletImpl

public StructureBuildingCodeletImpl()
Default Constructor

Method Detail

setAssociatedModule

public void setAssociatedModule(FrameworkModule module,
                                java.lang.String usage)
Description copied from class: FrameworkTaskImpl
Subclasses may override this method.

Specified by:
setAssociatedModule in interface FullyInitializable
Overrides:
setAssociatedModule in class FrameworkTaskImpl
Parameters:
module - the module to be associated.
usage - how module will be used
See Also:
ModuleUsage

runThisFrameworkTask

protected abstract void runThisFrameworkTask()
Description copied from class: FrameworkTaskImpl
To be overridden by extending classes. Overriding method should execute a handful of statements considered to constitute a single iteration of the task. For example, a codelet might look in a buffer for some content and make a change to it in a single iteration. The overriding method may also change the TaskStatus of a task. For example, if the task should only run once and stop, then the method FrameworkTaskImpl.cancel() may be used to stop the task from further execution (calls of this FrameworkTaskImpl.runThisFrameworkTask() beyond the current one.

Specified by:
runThisFrameworkTask in class FrameworkTaskImpl

reset

public void reset()
Description copied from interface: StructureBuildingCodelet
Clears this codelet's fields in preparation for reuse. Idea is that the same codelet object is reconfigured at runtime after it finishes to be run as a different altogether codelet.

Specified by:
reset in interface StructureBuildingCodelet

getCodeletRunResult

public java.lang.Object getCodeletRunResult()
Description copied from interface: StructureBuildingCodelet
Returns result of codelet's run

Specified by:
getCodeletRunResult in interface StructureBuildingCodelet
Returns:
Current information about the codelet's progress