InputType
- Type of input to convert into the inputs of the
InputOutputPairsOutputType
- Type of outputs to convert into the outputs of the
InputOutputPairspublic class CogxelWeightedInputOutputPairConverter<InputType,OutputType> extends java.lang.Object implements CogxelConverter<WeightedInputOutputPair<InputType,OutputType>>
Constructor and Description |
---|
CogxelWeightedInputOutputPairConverter()
Creates a new instance of CogxelWeightedInputOutputPairConverter
|
CogxelWeightedInputOutputPairConverter(CogxelConverter<InputType> inputConverter,
CogxelConverter<OutputType> outputConverter,
CogxelConverter<java.lang.Double> weightConverter)
Creates a new instance of CogxelWeightedInputOutputPairConverter
|
CogxelWeightedInputOutputPairConverter(CogxelWeightedInputOutputPairConverter<InputType,OutputType> other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
CogxelWeightedInputOutputPairConverter<InputType,OutputType> |
clone()
Creates a new clone (shallow copy) of this object.
|
WeightedInputOutputPair<InputType,OutputType> |
fromCogxels(CogxelState cogxels)
Converts from a CogxelState object to an object of type DataType.
|
CogxelInputOutputPairConverter<InputType,OutputType> |
getPairConverter()
Getter for pairConverter
|
SemanticIdentifierMap |
getSemanticIdentifierMap()
Gets the SemanticIdentifierMap used by this converter.
|
CogxelConverter<java.lang.Double> |
getWeightConverter()
Getter for weightConverter
|
void |
setPairConverter(CogxelInputOutputPairConverter<InputType,OutputType> pairConverter)
Setter for pairConverter
|
void |
setSemanticIdentifierMap(SemanticIdentifierMap semanticIdentifierMap)
Sets the SemanticIdentifierMap that the converter is to use.
|
void |
setWeightConverter(CogxelConverter<java.lang.Double> weightConverter)
Setter for weightConverter
|
void |
toCogxels(WeightedInputOutputPair<InputType,OutputType> data,
CogxelState cogxels)
Converts from an object of type DataType to an updated CogxelState.
|
public CogxelWeightedInputOutputPairConverter()
public CogxelWeightedInputOutputPairConverter(CogxelConverter<InputType> inputConverter, CogxelConverter<OutputType> outputConverter, CogxelConverter<java.lang.Double> weightConverter)
inputConverter
- Converts Cogxels for the inputoutputConverter
- Converts Cogxels for the outputweightConverter
- Converts the Cogxel for the weightpublic CogxelWeightedInputOutputPairConverter(CogxelWeightedInputOutputPairConverter<InputType,OutputType> other)
other
- Object to clonepublic CogxelWeightedInputOutputPairConverter<InputType,OutputType> clone()
clone
in interface CogxelConverter<WeightedInputOutputPair<InputType,OutputType>>
clone
in interface CloneableSerializable
clone
in class java.lang.Object
public CogxelConverter<java.lang.Double> getWeightConverter()
public void setWeightConverter(CogxelConverter<java.lang.Double> weightConverter)
weightConverter
- Adds the weight to the InputOutputPairpublic WeightedInputOutputPair<InputType,OutputType> fromCogxels(CogxelState cogxels)
fromCogxels
in interface CogxelConverter<WeightedInputOutputPair<InputType,OutputType>>
cogxels
- The CogxelState to convert to DataType.public void toCogxels(WeightedInputOutputPair<InputType,OutputType> data, CogxelState cogxels)
toCogxels
in interface CogxelConverter<WeightedInputOutputPair<InputType,OutputType>>
data
- The object to convert into the CogxelState.cogxels
- The CogxelState to update with the converted data.public CogxelInputOutputPairConverter<InputType,OutputType> getPairConverter()
public void setPairConverter(CogxelInputOutputPairConverter<InputType,OutputType> pairConverter)
pairConverter
- Creates the underlying InputOutputPairpublic SemanticIdentifierMap getSemanticIdentifierMap()
getSemanticIdentifierMap
in interface CogxelConverter<WeightedInputOutputPair<InputType,OutputType>>
public void setSemanticIdentifierMap(SemanticIdentifierMap semanticIdentifierMap)
setSemanticIdentifierMap
in interface CogxelConverter<WeightedInputOutputPair<InputType,OutputType>>
semanticIdentifierMap
- The SemanticIdentifierMap the converter is
to use.