InputType - Input type of the embedded EvaluatorOutputType - Output type of the embedded Evaluatorpublic class EvaluatorBasedCognitiveModule<InputType,OutputType> extends AbstractConcurrentCognitiveModule
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_NAME
Default name given to modules of this type
|
protected InputType |
input
A place to temporarily store the input read in by a call to readState;
this temporary store is blown away as soon as it used by evaluate,
because we NEVER retain state interally across module update cycles
|
protected OutputType |
output
A place to temporarily store the output generated by a call to evaluate;
this temporary store is blown away as soon as it used by evaluate,
because we NEVER retain state interally across module update cycles
|
| Constructor and Description |
|---|
EvaluatorBasedCognitiveModule(CognitiveModel model,
EvaluatorBasedCognitiveModuleSettings<InputType,OutputType> settings,
String name)
Creates a new instance of EvaluatorBasedCognitiveModule.
|
| Modifier and Type | Method and Description |
|---|---|
void |
evaluate() |
gov.sandia.cognition.evaluator.Evaluator<? super InputType,? extends OutputType> |
getEvaluator()
Gets the underlying evaluator that is being wrapped in this module.
|
CogxelConverter<InputType> |
getInputConverter()
Gets the input converter that is used to map from Cogxels to the
InputType.
|
String |
getName() |
CogxelConverter<OutputType> |
getOutputConverter()
Gets the output converter that is used to map from the OutputType to
Cogxels.
|
EvaluatorBasedCognitiveModuleSettings<InputType,OutputType> |
getSettings() |
CognitiveModuleState |
initializeState(CognitiveModelState modelState) |
void |
readState(CognitiveModelState modelState,
CognitiveModuleState previousModuleState) |
void |
setName(String name)
Sets the name of the module
|
protected void |
setSettings(EvaluatorBasedCognitiveModuleSettings<InputType,OutputType> settings)
Sets the settings of the module.
|
CognitiveModuleState |
writeState(CognitiveModelState modelState) |
updateprotected InputType input
protected OutputType output
public static final String DEFAULT_NAME
public EvaluatorBasedCognitiveModule(CognitiveModel model, EvaluatorBasedCognitiveModuleSettings<InputType,OutputType> settings, String name)
model - The model to create the module for.settings - The settings of the module.name - High-level name of this modulepublic CognitiveModuleState initializeState(CognitiveModelState modelState)
modelState - public void readState(CognitiveModelState modelState, CognitiveModuleState previousModuleState)
modelState - previousModuleState - public void evaluate()
public CognitiveModuleState writeState(CognitiveModelState modelState)
modelState - public String getName()
public void setName(String name)
name - Name to assign to the modulepublic EvaluatorBasedCognitiveModuleSettings<InputType,OutputType> getSettings()
protected void setSettings(EvaluatorBasedCognitiveModuleSettings<InputType,OutputType> settings)
settings - The module's settings.public gov.sandia.cognition.evaluator.Evaluator<? super InputType,? extends OutputType> getEvaluator()
public CogxelConverter<InputType> getInputConverter()
public CogxelConverter<OutputType> getOutputConverter()
Copyright © 2006–2015 Sandia National Laboratories. All rights reserved.