gov.sandia.cognition.framework.learning
Class EvaluatorBasedCognitiveModuleFactory<InputType,OutputType>

java.lang.Object
  extended by gov.sandia.cognition.framework.learning.EvaluatorBasedCognitiveModuleFactory<InputType,OutputType>
Type Parameters:
InputType - Input type of the embedded Evaluator
OutputType - Output type of the embedded Evaluator
All Implemented Interfaces:
CognitiveModuleFactory, CloneableSerializable, Serializable, Cloneable

public class EvaluatorBasedCognitiveModuleFactory<InputType,OutputType>
extends Object
implements CognitiveModuleFactory, CloneableSerializable

The EvaluatorBasedCognitiveModuleFactory class implements a factory for the EvaluatorBasedCognitiveModule. When a module is created the factory checks to see if the underlying evaluator is a StatefulEvaluator to determine if a normal EvaluatorBasedCognitiveModule should be created (non-stateful) or a StatefulEvaluatorBasedCognitiveModule should be created (stateful).

Since:
2.0
Author:
Justin Basilico, Kevin R. Dixon
See Also:
Serialized Form

Constructor Summary
EvaluatorBasedCognitiveModuleFactory()
          Creates a new instance of EvaluatorBasedCognitiveModuleFactory.
EvaluatorBasedCognitiveModuleFactory(EvaluatorBasedCognitiveModuleFactory<InputType,OutputType> other)
          Creates a new copy of a EvaluatorBasedCognitiveModuleFactory.
EvaluatorBasedCognitiveModuleFactory(EvaluatorBasedCognitiveModuleSettings<InputType,OutputType> settings, String name)
          Creates a new instance of EvaluatorBasedCognitiveModuleFactory.
 
Method Summary
 EvaluatorBasedCognitiveModuleFactory<InputType,OutputType> clone()
          Creates a clone of this EvaluatorBasedCognitiveModuleFactory.
 CognitiveModule createModule(CognitiveModel model)
          Creates a new CognitiveModule for the given CognitiveModel.
 String getName()
          Getter for name
 EvaluatorBasedCognitiveModuleSettings<InputType,OutputType> getSettings()
          Gets the settings of the module created by the factory.
 void setName(String name)
          Setter for name
 void setSettings(EvaluatorBasedCognitiveModuleSettings<InputType,OutputType> settings)
          Sets the settings of the module created by the factory.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvaluatorBasedCognitiveModuleFactory

public EvaluatorBasedCognitiveModuleFactory()
Creates a new instance of EvaluatorBasedCognitiveModuleFactory.


EvaluatorBasedCognitiveModuleFactory

public EvaluatorBasedCognitiveModuleFactory(EvaluatorBasedCognitiveModuleSettings<InputType,OutputType> settings,
                                            String name)
Creates a new instance of EvaluatorBasedCognitiveModuleFactory.

Parameters:
name - Human-readable name of the module
settings - The settings for the module.

EvaluatorBasedCognitiveModuleFactory

public EvaluatorBasedCognitiveModuleFactory(EvaluatorBasedCognitiveModuleFactory<InputType,OutputType> other)
Creates a new copy of a EvaluatorBasedCognitiveModuleFactory.

Parameters:
other - The other EvaluatorBasedCognitiveModuleFactory to copy.
Method Detail

clone

public EvaluatorBasedCognitiveModuleFactory<InputType,OutputType> clone()
Creates a clone of this EvaluatorBasedCognitiveModuleFactory.

Specified by:
clone in interface CloneableSerializable
Overrides:
clone in class Object
Returns:
A clone of this object.

createModule

public CognitiveModule createModule(CognitiveModel model)
Creates a new CognitiveModule for the given CognitiveModel.

Specified by:
createModule in interface CognitiveModuleFactory
Parameters:
model - The model to create a new module for
Returns:
A new CognitiveModule for the given model

getSettings

public EvaluatorBasedCognitiveModuleSettings<InputType,OutputType> getSettings()
Gets the settings of the module created by the factory.

Returns:
The settings of the module created by the factory.

setSettings

public void setSettings(EvaluatorBasedCognitiveModuleSettings<InputType,OutputType> settings)
Sets the settings of the module created by the factory.

Parameters:
settings - The settings of the module created by the factory.

getName

public String getName()
Getter for name

Returns:
Human-readable name of the module

setName

public void setName(String name)
Setter for name

Parameters:
name - Human-readable name of the module