edu.indiana.iucbrf.problem.differentiator
Interface ProblemDifferentiator

All Superinterfaces:
Differentiator, java.io.Serializable
All Known Implementing Classes:
AbstractProblemDifferentiator, AverageIgnoreProblemDifferentiator, AverageProblemDifferentiator, CountMismatchProblemDifferentiator, EuclideanProblemDifferentiator, NormalizedEuclideanProblemDifferentiator

public interface ProblemDifferentiator
extends java.io.Serializable, Differentiator

A ProblemDifferentiator determines how to measure the difference between two problem descriptions. Differences are measured over the indices of a problem.


Method Summary
 void addSimilarityWeight(FeatureKey featureKey, double similarityWeight)
           
 double calcDifference(java.lang.Object obj1, java.lang.Object obj2)
           
 double calcDifference(java.lang.Object obj1, java.lang.Object obj2, java.util.Collection specialIndices)
           
 java.util.Iterator defaultIndicesIterator()
           
 java.util.HashSet getDefaultIndices()
           
 FeatureDifferentiator getFeatureDifferentiator(FeatureKey key)
          Get the feature differentiator for the given feature.
 int getIndexCount()
           
 DoubleCollection getSimilarityWeights()
           
 UnknownFeatureHandler getUnknownFeatureHandler()
           
 boolean isIndex(FeatureKey key)
           
 void removeFeature(FeatureKey featureKey)
           
 void setIsIndex(FeatureKey key, boolean isIndex)
           
 void setOverridingFeatureDifferentiator(FeatureKey key, FeatureDifferentiator featureDifferentiator)
          Set the feature differentiator for a feature for this problem differentiator to be not the one based on the variable type (as defined in Feature.getDefaultVariableType()), but instead a customized one.
 void setToDefaultFeatureDifferentiator(Domain domain, FeatureKey key)
          Set the feature differentiator to the default for this feature type.
 void setToDefaultFeatureDifferentiator(FeatureSpec spec)
          Set the feature differentiator to the default for this feature type.
 void setUnknownFeatureHandler(UnknownFeatureHandler ufh)
           
 

Method Detail

setIsIndex

void setIsIndex(FeatureKey key,
                boolean isIndex)

isIndex

boolean isIndex(FeatureKey key)

defaultIndicesIterator

java.util.Iterator defaultIndicesIterator()

getIndexCount

int getIndexCount()

getUnknownFeatureHandler

UnknownFeatureHandler getUnknownFeatureHandler()

setUnknownFeatureHandler

void setUnknownFeatureHandler(UnknownFeatureHandler ufh)

getSimilarityWeights

DoubleCollection getSimilarityWeights()

getDefaultIndices

java.util.HashSet getDefaultIndices()

addSimilarityWeight

void addSimilarityWeight(FeatureKey featureKey,
                         double similarityWeight)

removeFeature

void removeFeature(FeatureKey featureKey)

calcDifference

double calcDifference(java.lang.Object obj1,
                      java.lang.Object obj2)
Specified by:
calcDifference in interface Differentiator

calcDifference

double calcDifference(java.lang.Object obj1,
                      java.lang.Object obj2,
                      java.util.Collection specialIndices)

setToDefaultFeatureDifferentiator

void setToDefaultFeatureDifferentiator(Domain domain,
                                       FeatureKey key)
Set the feature differentiator to the default for this feature type. This is called automatically when a problem feature is added to the domain, and may also be called manually to cancel a call to setOverridingFeatureDifferentiator().


setToDefaultFeatureDifferentiator

void setToDefaultFeatureDifferentiator(FeatureSpec spec)
Set the feature differentiator to the default for this feature type. This is called automatically when a problem feature is added to the domain, and may also be called manually to cancel a call to setOverridingFeatureDifferentiator().


setOverridingFeatureDifferentiator

void setOverridingFeatureDifferentiator(FeatureKey key,
                                        FeatureDifferentiator featureDifferentiator)
Set the feature differentiator for a feature for this problem differentiator to be not the one based on the variable type (as defined in Feature.getDefaultVariableType()), but instead a customized one.


getFeatureDifferentiator

FeatureDifferentiator getFeatureDifferentiator(FeatureKey key)
Get the feature differentiator for the given feature. If one has not been set using setOverridingFeatureDifferentiator, the default one defined in FeatureSpec.getDefaultFeatureDifferentiator() will be returned.