edu.indiana.iucbrf.examples.realtor
Class RealtorAdapter
java.lang.Object
edu.indiana.iucbrf.adaptation.Adaptation
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
houseSizeKey
public FeatureKey houseSizeKey
- The feature key for the house size problem feature, used in this simple
adaptation approach.
RealtorAdapter
public RealtorAdapter(Domain domain,
FeatureKey sizeFeatureKey)
- Creates new RealtorAdapter
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 1NNcurrentProblem
- 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.