edu.washington.cs.supple.render.utility
Interface FactoredCostCalculator

All Known Implementing Classes:
BasicFactoredCostCalculator, RegretCalculator

public interface FactoredCostCalculator

Author:
kgajos An interface for all cost calculators that use factored cost functions

Method Summary
 double calculateCost(int strategy, Solution solution, FactoredCostFunction costFunction)
          Calculates the cost of an entire solution
 float calculateCost(int strategy, Widget reference, java.util.Collection feasibleWidgets, java.util.Collection factors)
          Computes cost for a reference widget and a domain of feasible widgets
 

Method Detail

calculateCost

public float calculateCost(int strategy,
                           Widget reference,
                           java.util.Collection feasibleWidgets,
                           java.util.Collection factors)
Computes cost for a reference widget and a domain of feasible widgets

Parameters:
strategy - an optional argument if more than one variant of a method is possible
reference - reference widget
feasibleWidgets - all feasible widgets
factors - a collection of factors
Returns:
the cost

calculateCost

public double calculateCost(int strategy,
                            Solution solution,
                            FactoredCostFunction costFunction)
Calculates the cost of an entire solution

Parameters:
strategy - an optional argument if more than one variant of a method is possible
solution - a solution to be evaluated
costFunction - the cost function to be used
Returns:
the cost