gov.sandia.cognition.framework.lite
Interface PatternRecognizerLite

All Superinterfaces:
Cloneable, CloneableSerializable, CognitiveModuleSettings, Serializable
All Known Subinterfaces:
MutablePatternRecognizerLite
All Known Implementing Classes:
SimplePatternRecognizer

public interface PatternRecognizerLite
extends CognitiveModuleSettings

The PatternRecognizerLite interface defines the functionality needed by a pattern recognizer that is to be used by a SemanticMemoryLite.

Since:
1.0
Author:
Justin Basilico, Kevin R. Dixon

Method Summary
 PatternRecognizerLite clone()
          Creates a deep copy of the pattern recognizer.
 Vector createEmptyInputVector()
          Creates an empty vector to use for input.
 Collection<SemanticLabel> getAllLabels()
          Gets the collection of all the labels used in the recognizer.
 int getInputDimensionality()
          Gets the dimensionality of the input vector to the pattern recognizer.
 Collection<SemanticLabel> getInputLabels()
          Gets the labels for the dimensions of the input vector.
 SemanticNetwork getNetwork()
          Gets the SemanticNetwork describing the structure of the pattern recognizer.
 int getOutputDimensionality()
          Gets the dimensionality of the output vector to the pattern recognizer.
 Collection<SemanticLabel> getOutputLabels()
          Gets the labels for the dimensions of the output vector.
 CognitiveModuleState initialState()
          Creates a new initial state for the recognizer.
 boolean isInputLabel(SemanticLabel label)
          Takes a SemanticLabel and returns true if it is a label used to provide input to the PatternRecognizerLite.
 boolean isLabel(SemanticLabel label)
          Takes a SemanticLabel and returns true if the PatternRecognizer uses it.
 boolean isOutputLabel(SemanticLabel label)
          Takes a SemanticLabel and returns true if it is a label used as output from the PatternRecognizerLite.
 Vector recognize(CognitiveModuleState state, Vector inputs)
          Computes the recognition.
 

Method Detail

clone

PatternRecognizerLite clone()
Creates a deep copy of the pattern recognizer.

Specified by:
clone in interface CloneableSerializable
Returns:
A deep copy of this PatternRecognizerLite.

initialState

CognitiveModuleState initialState()
Creates a new initial state for the recognizer.

Returns:
A new initial state for the recognizer.

recognize

Vector recognize(CognitiveModuleState state,
                 Vector inputs)
Computes the recognition. It operates on the state by side-effect and uses the given set of inputs and sets the outputs.

Parameters:
state - The previous state of the module.
inputs - The vector of inputs to the recognizer.
Returns:
The output vector

isLabel

boolean isLabel(SemanticLabel label)
Takes a SemanticLabel and returns true if the PatternRecognizer uses it.

Parameters:
label - The label to determine if the recognizer uses.
Returns:
True if the label is used by the recognizer and false if not or if the label is not valid.

isInputLabel

boolean isInputLabel(SemanticLabel label)
Takes a SemanticLabel and returns true if it is a label used to provide input to the PatternRecognizerLite.

Parameters:
label - The label to determine if it is an input label.
Returns:
True if the label is an input label and false otherwise.

isOutputLabel

boolean isOutputLabel(SemanticLabel label)
Takes a SemanticLabel and returns true if it is a label used as output from the PatternRecognizerLite.

Parameters:
label - The label to determine if it is an output label.
Returns:
True if the label is an output label and false otherwise.

createEmptyInputVector

Vector createEmptyInputVector()
Creates an empty vector to use for input.

Returns:
An empty input vector.

getInputDimensionality

int getInputDimensionality()
Gets the dimensionality of the input vector to the pattern recognizer.

Returns:
The dimensionality of the input vector of the pattern recognizer.

getOutputDimensionality

int getOutputDimensionality()
Gets the dimensionality of the output vector to the pattern recognizer.

Returns:
The dimensionality of the output vector of the pattern recognizer.

getAllLabels

Collection<SemanticLabel> getAllLabels()
Gets the collection of all the labels used in the recognizer.

Returns:
The collection of all labels used in the recognizer.

getInputLabels

Collection<SemanticLabel> getInputLabels()
Gets the labels for the dimensions of the input vector.

Returns:
The labels for the dimensions of the input vector.

getOutputLabels

Collection<SemanticLabel> getOutputLabels()
Gets the labels for the dimensions of the output vector.

Returns:
The labels for the dimensions of the output vector.

getNetwork

SemanticNetwork getNetwork()
Gets the SemanticNetwork describing the structure of the pattern recognizer.

Returns:
The recognizer's SemanticNetwork