edu.indiana.iucbrf.feature
Class OneFeatureMutualDistanceComparator

java.lang.Object
  extended by edu.indiana.iucbrf.feature.OneFeatureMutualDistanceComparator
All Implemented Interfaces:
java.util.Comparator

public class OneFeatureMutualDistanceComparator
extends java.lang.Object
implements java.util.Comparator

Compares two cases based on which one has a smaller distance from a third base case according to a single feature.


Field Summary
protected  Case baseCase
           
protected  Feature baseFeature
           
protected  FeatureDifferentiator featureDifferentiator
           
protected  FeatureKey featureToCompare
           
protected  ProblemDifferentiator problemDifferentiator
           
 
Constructor Summary
OneFeatureMutualDistanceComparator(ProblemDifferentiator problemDifferentiator)
          Creates a new instance of OneFeatureMutualDistanceComparator
OneFeatureMutualDistanceComparator(ProblemDifferentiator problemDifferentiator, Case baseCase, FeatureKey featureToCompare)
          Creates a new instance of OneFeatureMutualDistanceComparator
 
Method Summary
 int compare(java.lang.Object case1, java.lang.Object case2)
           
 void setComparisonData(Case baseCase, FeatureKey featureToCompare)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

featureToCompare

protected FeatureKey featureToCompare

baseCase

protected Case baseCase

baseFeature

protected Feature baseFeature

problemDifferentiator

protected ProblemDifferentiator problemDifferentiator

featureDifferentiator

protected FeatureDifferentiator featureDifferentiator
Constructor Detail

OneFeatureMutualDistanceComparator

public OneFeatureMutualDistanceComparator(ProblemDifferentiator problemDifferentiator)
Creates a new instance of OneFeatureMutualDistanceComparator


OneFeatureMutualDistanceComparator

public OneFeatureMutualDistanceComparator(ProblemDifferentiator problemDifferentiator,
                                          Case baseCase,
                                          FeatureKey featureToCompare)
Creates a new instance of OneFeatureMutualDistanceComparator

Method Detail

setComparisonData

public void setComparisonData(Case baseCase,
                              FeatureKey featureToCompare)

compare

public int compare(java.lang.Object case1,
                   java.lang.Object case2)
Specified by:
compare in interface java.util.Comparator