edu.washington.cs.supple.render.utility
Class DistanceBasedQueryGenerator

java.lang.Object
  extended byedu.washington.cs.supple.render.utility.AbstractElicitationQueryGenerator
      extended byedu.washington.cs.supple.render.utility.DistanceBasedQueryGenerator
All Implemented Interfaces:
ElicitationQueryGenerator
Direct Known Subclasses:
HeuristicQueryGenerator, RandomQueryGenerator, VersionSpaceQueryGenerator

public abstract class DistanceBasedQueryGenerator
extends AbstractElicitationQueryGenerator

Author:
kgajos

Nested Class Summary
protected  class DistanceBasedQueryGenerator.ConstraintInfo
           
 
Field Summary
protected  java.util.Hashtable constraints
           
protected  java.util.Hashtable constraintScores
           
protected  java.util.Vector previouslyUsedConstraints
           
 
Fields inherited from class edu.washington.cs.supple.render.utility.AbstractElicitationQueryGenerator
constraintGenerator, costCalculator, costFunction, queryHistory, solver, vetoFunction, widgetFactory
 
Constructor Summary
DistanceBasedQueryGenerator()
           
 
Method Summary
protected abstract  double computeConstraintScore(FactorConstraint constraint)
           
protected  ElicitationQuery constructQuery(FactorConstraint constraint)
           
protected  void generateConstraintsForDomain(ElicitationQueryDomain domain)
           
protected  void generateConstraintsForElement(UiObject root, UiObject element)
           
protected  void generateConstraintsForUI(UiObject root)
           
 ElicitationQuery generateQuery(ElicitationQueryDomain domain, FactoredCostFunction curCostFunction)
           
protected  FactorConstraint getBestConstraint()
           
protected  DistanceBasedQueryGenerator.ConstraintInfo getConstraintInfo(FactorConstraint constraint)
           
protected  double getConstraintScore(FactorConstraint constraint)
           
protected  boolean isGoodCandidate(FactorConstraint constraint)
           
protected  void reset()
           
protected  void scoreConstraints()
           
protected  void setConstraintScore(FactorConstraint constraint, double score)
           
 
Methods inherited from class edu.washington.cs.supple.render.utility.AbstractElicitationQueryGenerator
addToQueryHistory, generatePerturbedSolution, generateQuery, getCostDifference, getPossibleWidgets, getPossibleWidgets, init, isGoodQueryCandidate, isGoodQueryCandidate, makeFactorConstraint, makeFactorConstraint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

constraints

protected java.util.Hashtable constraints

constraintScores

protected java.util.Hashtable constraintScores

previouslyUsedConstraints

protected java.util.Vector previouslyUsedConstraints
Constructor Detail

DistanceBasedQueryGenerator

public DistanceBasedQueryGenerator()
Method Detail

reset

protected void reset()

generateQuery

public ElicitationQuery generateQuery(ElicitationQueryDomain domain,
                                      FactoredCostFunction curCostFunction)
                               throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

generateConstraintsForDomain

protected void generateConstraintsForDomain(ElicitationQueryDomain domain)

generateConstraintsForUI

protected void generateConstraintsForUI(UiObject root)

generateConstraintsForElement

protected void generateConstraintsForElement(UiObject root,
                                             UiObject element)

isGoodCandidate

protected boolean isGoodCandidate(FactorConstraint constraint)

scoreConstraints

protected void scoreConstraints()

computeConstraintScore

protected abstract double computeConstraintScore(FactorConstraint constraint)

setConstraintScore

protected void setConstraintScore(FactorConstraint constraint,
                                  double score)

getConstraintScore

protected double getConstraintScore(FactorConstraint constraint)

getConstraintInfo

protected DistanceBasedQueryGenerator.ConstraintInfo getConstraintInfo(FactorConstraint constraint)

getBestConstraint

protected FactorConstraint getBestConstraint()

constructQuery

protected ElicitationQuery constructQuery(FactorConstraint constraint)