gov.sandia.cognition.framework.learning.converter
Interface CogxelConverter<DataType>

Type Parameters:
DataType - Type of data to convert to/from Cogxels
All Superinterfaces:
Cloneable, CloneableSerializable, Serializable
All Known Implementing Classes:
AbstractCogxelConverter, AbstractCogxelPairConverter, CogxelBooleanConverter, CogxelDoubleConverter, CogxelInputOutputPairConverter, CogxelMatrixConverter, CogxelTargetEstimatePairConverter, CogxelVectorCollectionConverter, CogxelVectorConverter, CogxelWeightedInputOutputPairConverter

public interface CogxelConverter<DataType>
extends CloneableSerializable

The CogxelConverter interface defines the functionality required for an object to act as a converter from some DataType to and from a CogxelState object. This is used to adapt components that use other data types to the Cognitive Framework. It is important that the CogxelConverter not keep dynamic state and that it supports the clone method properly.

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

Method Summary
 CogxelConverter<DataType> clone()
          Creates a new clone (shallow copy) of this object.
 DataType fromCogxels(CogxelState cogxels)
          Converts from a CogxelState object to an object of type DataType.
 SemanticIdentifierMap getSemanticIdentifierMap()
          Gets the SemanticIdentifierMap used by this converter.
 void setSemanticIdentifierMap(SemanticIdentifierMap semanticIdentifierMap)
          Sets the SemanticIdentifierMap that the converter is to use.
 void toCogxels(DataType data, CogxelState cogxels)
          Converts from an object of type DataType to an updated CogxelState.
 

Method Detail

fromCogxels

DataType fromCogxels(CogxelState cogxels)
Converts from a CogxelState object to an object of type DataType.

Parameters:
cogxels - The CogxelState to convert to DataType.
Returns:
An object of DataType extracted from the given CogxelState.

toCogxels

void toCogxels(DataType data,
               CogxelState cogxels)
Converts from an object of type DataType to an updated CogxelState.

Parameters:
data - The object to convert into the CogxelState.
cogxels - The CogxelState to update with the converted data.

getSemanticIdentifierMap

SemanticIdentifierMap getSemanticIdentifierMap()
Gets the SemanticIdentifierMap used by this converter.

Returns:
The SemanticIdentifierMap used by this converter.

setSemanticIdentifierMap

void setSemanticIdentifierMap(SemanticIdentifierMap semanticIdentifierMap)
Sets the SemanticIdentifierMap that the converter is to use.

Parameters:
semanticIdentifierMap - The SemanticIdentifierMap the converter is to use.

clone

CogxelConverter<DataType> clone()
Creates a new clone (shallow copy) of this object.

Specified by:
clone in interface CloneableSerializable
Returns:
A new clone (shallow copy) of this object.