gov.sandia.cognition.framework.learning.converter
Class CogxelTargetEstimatePairConverter<TargetType,EstimateType>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.framework.learning.converter.AbstractCogxelConverter<PairType>
          extended by gov.sandia.cognition.framework.learning.converter.AbstractCogxelPairConverter<TargetType,EstimateType,TargetEstimatePair<TargetType,EstimateType>>
              extended by gov.sandia.cognition.framework.learning.converter.CogxelTargetEstimatePairConverter<TargetType,EstimateType>
Type Parameters:
TargetType - Type of the targets
EstimateType - Type of the estimates
All Implemented Interfaces:
CogxelConverter<TargetEstimatePair<TargetType,EstimateType>>, CloneableSerializable, Serializable, Cloneable

public class CogxelTargetEstimatePairConverter<TargetType,EstimateType>
extends AbstractCogxelPairConverter<TargetType,EstimateType,TargetEstimatePair<TargetType,EstimateType>>

CogxelConverter based on a TargetEstimatePair.

Since:
3.0
Author:
Kevin R. Dixon
See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.sandia.cognition.framework.learning.converter.AbstractCogxelConverter
semanticIdentifierMap
 
Constructor Summary
CogxelTargetEstimatePairConverter()
          Creates a new CogxelTargetEstimatePairConverter.
CogxelTargetEstimatePairConverter(CogxelConverter<TargetType> targetConverter, CogxelConverter<EstimateType> estimateConverter)
          Creates a new CogxelTargetEstimatePairConverter with the given converters for each element of the pair.
CogxelTargetEstimatePairConverter(CogxelConverter<TargetType> targetConverter, CogxelConverter<EstimateType> estimateConverter, SemanticIdentifierMap semanticIdentifierMap)
          Creates a new CogxelTargetEstimatePairConverter with the given converters for each element of the pair.
 
Method Summary
 TargetEstimatePair<TargetType,EstimateType> createPair(TargetType first, EstimateType second)
          Creates a Pair from the needed data
 boolean equals(Object other)
           
 CogxelConverter<EstimateType> getEstimateConverter()
          Gets the converter for the estimate value.
 CogxelConverter<TargetType> getTargetConverter()
          Gets the converter for the target value.
 int hashCode()
           
 void setEstimateConverter(CogxelConverter<EstimateType> estimateConverter)
          Sets the converter for the estimate value.
 void setTargetConverter(CogxelConverter<TargetType> targetConverter)
          Sets the converter for the target value.
 
Methods inherited from class gov.sandia.cognition.framework.learning.converter.AbstractCogxelPairConverter
clone, equals, fromCogxels, getFirstConverter, getSecondConverter, setFirstConverter, setSecondConverter, setSemanticIdentifierMap, toCogxels
 
Methods inherited from class gov.sandia.cognition.framework.learning.converter.AbstractCogxelConverter
buildIdentifierCache, getSemanticIdentifierMap
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CogxelTargetEstimatePairConverter

public CogxelTargetEstimatePairConverter()
Creates a new CogxelTargetEstimatePairConverter.


CogxelTargetEstimatePairConverter

public CogxelTargetEstimatePairConverter(CogxelConverter<TargetType> targetConverter,
                                         CogxelConverter<EstimateType> estimateConverter)
Creates a new CogxelTargetEstimatePairConverter with the given converters for each element of the pair.

Parameters:
targetConverter - The CogxelConverter for the target element of the pair.
estimateConverter - The CogxelConverter for the estimate element of the pair.

CogxelTargetEstimatePairConverter

public CogxelTargetEstimatePairConverter(CogxelConverter<TargetType> targetConverter,
                                         CogxelConverter<EstimateType> estimateConverter,
                                         SemanticIdentifierMap semanticIdentifierMap)
Creates a new CogxelTargetEstimatePairConverter with the given converters for each element of the pair.

Parameters:
targetConverter - The CogxelConverter for the target element of the pair.
estimateConverter - The CogxelConverter for the estimate element of the pair.
semanticIdentifierMap - The SemanticIdentifierMap for the converter.
Method Detail

createPair

public TargetEstimatePair<TargetType,EstimateType> createPair(TargetType first,
                                                              EstimateType second)
Description copied from class: AbstractCogxelPairConverter
Creates a Pair from the needed data

Specified by:
createPair in class AbstractCogxelPairConverter<TargetType,EstimateType,TargetEstimatePair<TargetType,EstimateType>>
Parameters:
first - First element of the Pair
second - Second element of the Pair
Returns:
Pair with the given parameters

equals

public boolean equals(Object other)
Overrides:
equals in class AbstractCogxelPairConverter<TargetType,EstimateType,TargetEstimatePair<TargetType,EstimateType>>

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractCogxelPairConverter<TargetType,EstimateType,TargetEstimatePair<TargetType,EstimateType>>

getTargetConverter

public CogxelConverter<TargetType> getTargetConverter()
Gets the converter for the target value.

Returns:
The target converter.

setTargetConverter

public void setTargetConverter(CogxelConverter<TargetType> targetConverter)
Sets the converter for the target value.

Parameters:
targetConverter - The target converter.

getEstimateConverter

public CogxelConverter<EstimateType> getEstimateConverter()
Gets the converter for the estimate value.

Returns:
The estimate converter.

setEstimateConverter

public void setEstimateConverter(CogxelConverter<EstimateType> estimateConverter)
Sets the converter for the estimate value.

Parameters:
estimateConverter - The estimate converter.