edu.indiana.iucbrf.problem.differentiator
Class CountMismatchProblemDifferentiator

java.lang.Object
  extended by edu.indiana.iucbrf.problem.differentiator.AbstractProblemDifferentiator
      extended by edu.indiana.iucbrf.problem.differentiator.CountMismatchProblemDifferentiator
All Implemented Interfaces:
ProblemDifferentiator, Differentiator, java.io.Serializable

public class CountMismatchProblemDifferentiator
extends AbstractProblemDifferentiator

Counts the number of features that are not equal (according to Feature.equals()) between two problems.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.indiana.iucbrf.problem.differentiator.AbstractProblemDifferentiator
defaultIndices, keyToFeatureDifferentiator, similarityWts, unknownFeatureHandler
 
Constructor Summary
CountMismatchProblemDifferentiator(DoubleCollection similarityWts, java.util.HashSet defaultIndices, Domain domain)
          Creates a new instance of CountMismatchProblemDifferentiator
 
Method Summary
protected  double calcDifference(Problem p1, Problem p2, java.util.Collection indicesToUse)
          Creates a new instance of CountMismatchProblemDifferentiator
 java.lang.String toString()
           
 
Methods inherited from class edu.indiana.iucbrf.problem.differentiator.AbstractProblemDifferentiator
addSimilarityWeight, calcDifference, calcDifference, defaultIndicesIterator, equals, getDefaultIndices, getFeatureDifferentiator, getIndexCount, getSimilarityWeights, getUnknownFeatureHandler, hashCode, isIndex, removeFeature, setIsIndex, setOverridingFeatureDifferentiator, setToDefaultFeatureDifferentiator, setToDefaultFeatureDifferentiator, setUnknownFeatureHandler, setupDefaultFeatureDifferentiators
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CountMismatchProblemDifferentiator

public CountMismatchProblemDifferentiator(DoubleCollection similarityWts,
                                          java.util.HashSet defaultIndices,
                                          Domain domain)
Creates a new instance of CountMismatchProblemDifferentiator

Method Detail

calcDifference

protected double calcDifference(Problem p1,
                                Problem p2,
                                java.util.Collection indicesToUse)
Creates a new instance of CountMismatchProblemDifferentiator

Specified by:
calcDifference in class AbstractProblemDifferentiator

toString

public java.lang.String toString()
Overrides:
toString in class AbstractProblemDifferentiator