edu.indiana.iucbrf.examples.realtor
Class RealtorAdapter

java.lang.Object
  extended by edu.indiana.iucbrf.adaptation.Adaptation
      extended by edu.indiana.iucbrf.examples.realtor.RealtorAdapter
All Implemented Interfaces:
java.io.Serializable

public class RealtorAdapter
extends Adaptation

This is the domain-dependent implementation of the adaptation policy for this domain.

See Also:
Serialized Form

Field Summary
 FeatureKey houseSizeKey
          The feature key for the house size problem feature, used in this simple adaptation approach.
 
Fields inherited from class edu.indiana.iucbrf.adaptation.Adaptation
debugMode, wts
 
Constructor Summary
RealtorAdapter(Domain domain, FeatureKey sizeFeatureKey)
          Creates new RealtorAdapter
 
Method Summary
 Solution adaptTo(RetrievalResults retrieved, Problem currentProblem, Domain domain)
          Domain-specific adaptation of house prices.
 
Methods inherited from class edu.indiana.iucbrf.adaptation.Adaptation
setDebugMode, setWeights
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

houseSizeKey

public FeatureKey houseSizeKey
The feature key for the house size problem feature, used in this simple adaptation approach.

Constructor Detail

RealtorAdapter

public RealtorAdapter(Domain domain,
                      FeatureKey sizeFeatureKey)
Creates new RealtorAdapter

Method Detail

adaptTo

public Solution adaptTo(RetrievalResults retrieved,
                        Problem currentProblem,
                        Domain domain)
Domain-specific adaptation of house prices. This is a simple approach that only considers house size. It is assumed that the domain sent here is the same as the one sent in the constructor.

Specified by:
adaptTo in class Adaptation
Parameters:
retrieved - Contains only a single solution, because Realtor uses 1NN
currentProblem - The Problem object being adapted to. In some adaptation implementations, this parameter may be ignored.
domain - The domain in which the adaptation is taking place.
Returns:
Solution object of the adapted solution.