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 |
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
possiblereference - reference widgetfeasibleWidgets - all feasible widgetsfactors - 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
possiblesolution - a solution to be evaluatedcostFunction - the cost function to be used
- Returns:
- the cost