gov.sandia.cognition.framework.lite
Class VectorBasedPerceptionModule

java.lang.Object
  extended by gov.sandia.cognition.framework.lite.VectorBasedPerceptionModule
All Implemented Interfaces:
CognitiveModule, Serializable

public class VectorBasedPerceptionModule
extends Object
implements CognitiveModule, Serializable

Module that takes CognitiveModelInputs and turns them into a Vector

Since:
1.0
Author:
Kevin R. Dixon
See Also:
Serialized Form

Field Summary
static String MODULE_NAME
          The name of the module.
 
Constructor Summary
VectorBasedPerceptionModule(CogxelFactory cogxelFactory)
          Creates a new instance of VectorBasedPerceptionModule
 
Method Summary
 CogxelFactory getCogxelFactory()
          Getter for cogxelFactory
 String getName()
          Gets the human-readable name of module.
 CognitiveModuleSettings getSettings()
          Returns null because this module has no settings.
 CognitiveModuleState initializeState(CognitiveModelState modelState)
          This method initializes the state object for a CognitiveModel by adding any necessary information to the model state and returining the default state for the module.
 void setCogxelFactory(CogxelFactory cogxelFactory)
          Setter for cogxelFactory
 CognitiveModuleState update(CognitiveModelState modelState, CognitiveModuleState previousModuleState)
          This method is the main method for a CognitiveModule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODULE_NAME

public static final String MODULE_NAME
The name of the module.

See Also:
Constant Field Values
Constructor Detail

VectorBasedPerceptionModule

public VectorBasedPerceptionModule(CogxelFactory cogxelFactory)
Creates a new instance of VectorBasedPerceptionModule

Parameters:
cogxelFactory - Factory for creating Cogxels for perception
Method Detail

initializeState

public CognitiveModuleState initializeState(CognitiveModelState modelState)
This method initializes the state object for a CognitiveModel by adding any necessary information to the model state and returining the default state for the module.

Specified by:
initializeState in interface CognitiveModule
Parameters:
modelState - The CognitiveModelState to initalize
Returns:
The initial state of the CognitiveModule

getName

public String getName()
Gets the human-readable name of module.

Specified by:
getName in interface CognitiveModule
Returns:
The human-readable name of the module.

getSettings

public CognitiveModuleSettings getSettings()
Returns null because this module has no settings.

Specified by:
getSettings in interface CognitiveModule
Returns:
Null because this module has no settings.

update

public CognitiveModuleState update(CognitiveModelState modelState,
                                   CognitiveModuleState previousModuleState)
This method is the main method for a CognitiveModule. It updates the state of the model by modifying the given CognitiveModelState object. Since a module is not to store any local state information, it is given its previous CognitiveModuleState object in order to provide the information about its state. It then returns its updated CognitiveModuleState as the result of the update method.

Specified by:
update in interface CognitiveModule
Parameters:
modelState - The CognitiveModelState to update
previousModuleState - The previous CognitiveModuleState returned by this module
Returns:
The updated CognitiveModuleState for this module

getCogxelFactory

public CogxelFactory getCogxelFactory()
Getter for cogxelFactory

Returns:
Factory for creating Cogxels for perception

setCogxelFactory

public void setCogxelFactory(CogxelFactory cogxelFactory)
Setter for cogxelFactory

Parameters:
cogxelFactory - Factory for creating Cogxels for perception