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

java.lang.Object
  extended byedu.washington.cs.supple.render.utility.AbstractElicitationQueryGenerator
All Implemented Interfaces:
ElicitationQueryGenerator
Direct Known Subclasses:
BasicQueryGenerator, DistanceBasedQueryGenerator, MinimizeUncertaintyQueryGenerator, RigorousHeuristicQueryGenerator

public abstract class AbstractElicitationQueryGenerator
extends java.lang.Object
implements ElicitationQueryGenerator

Author:
kgajos

Field Summary
protected  FactoredCostConstraintGenerator constraintGenerator
           
protected  FactoredCostCalculator costCalculator
           
protected  FactoredCostFunction costFunction
           
protected  java.util.Vector queryHistory
           
protected  Solver solver
           
protected  VetoFunction vetoFunction
           
protected  WidgetFactory widgetFactory
           
 
Constructor Summary
AbstractElicitationQueryGenerator()
           
 
Method Summary
protected  void addToQueryHistory(Widget w)
           
protected  Solution generatePerturbedSolution(UiObject root, java.awt.Dimension sizeConstraint, Widget replacement)
           
 ElicitationQuery generateQuery(UiObject root, java.awt.Dimension sizeConstraint, FactoredCostFunction curCostFunction)
           
protected  double getCostDifference(Widget w1, Widget w2)
           
protected  java.util.Vector getPossibleWidgets(UiObject root)
           
protected  java.util.Vector getPossibleWidgets(Widget root)
           
protected  void init()
           
protected  boolean isGoodQueryCandidate(Solution solnA, Solution solnB)
           
protected  boolean isGoodQueryCandidate(Widget curWidget, Widget newWidget)
           
protected  FactorConstraint makeFactorConstraint(UiObject object, WidgetDescriptor curWidget, WidgetDescriptor newWidget)
          Generates a factor constraint for a situation where curWidget is worse than newWidet
protected  FactorConstraint makeFactorConstraint(Widget curWidget, Widget newWidget)
          Generates a factor constraint for a situation where curWidget is worse than newWidet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.washington.cs.supple.render.utility.ElicitationQueryGenerator
generateQuery
 

Field Detail

solver

protected Solver solver

costCalculator

protected FactoredCostCalculator costCalculator

costFunction

protected FactoredCostFunction costFunction

vetoFunction

protected VetoFunction vetoFunction

widgetFactory

protected WidgetFactory widgetFactory

constraintGenerator

protected FactoredCostConstraintGenerator constraintGenerator

queryHistory

protected java.util.Vector queryHistory
Constructor Detail

AbstractElicitationQueryGenerator

public AbstractElicitationQueryGenerator()
Method Detail

generateQuery

public ElicitationQuery generateQuery(UiObject root,
                                      java.awt.Dimension sizeConstraint,
                                      FactoredCostFunction curCostFunction)
                               throws java.lang.InterruptedException
Specified by:
generateQuery in interface ElicitationQueryGenerator
Throws:
java.lang.InterruptedException

init

protected void init()

getPossibleWidgets

protected java.util.Vector getPossibleWidgets(Widget root)

getPossibleWidgets

protected java.util.Vector getPossibleWidgets(UiObject root)

makeFactorConstraint

protected FactorConstraint makeFactorConstraint(Widget curWidget,
                                                Widget newWidget)
Generates a factor constraint for a situation where curWidget is worse than newWidet

Parameters:
curWidget -
newWidget -
Returns:

makeFactorConstraint

protected FactorConstraint makeFactorConstraint(UiObject object,
                                                WidgetDescriptor curWidget,
                                                WidgetDescriptor newWidget)
Generates a factor constraint for a situation where curWidget is worse than newWidet

Parameters:
curWidget -
newWidget -
Returns:

isGoodQueryCandidate

protected boolean isGoodQueryCandidate(Widget curWidget,
                                       Widget newWidget)

isGoodQueryCandidate

protected boolean isGoodQueryCandidate(Solution solnA,
                                       Solution solnB)

generatePerturbedSolution

protected Solution generatePerturbedSolution(UiObject root,
                                             java.awt.Dimension sizeConstraint,
                                             Widget replacement)
                                      throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

addToQueryHistory

protected void addToQueryHistory(Widget w)

getCostDifference

protected double getCostDifference(Widget w1,
                                   Widget w2)