edu.washington.cs.supple.render.utility
Class BasicFactoredCostCalculator
java.lang.Object
edu.washington.cs.supple.render.utility.BasicFactoredCostCalculator
- All Implemented Interfaces:
- FactoredCostCalculator
- public class BasicFactoredCostCalculator
- extends java.lang.Object
- implements FactoredCostCalculator
- Author:
- kgajos
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicFactoredCostCalculator
public BasicFactoredCostCalculator()
calculateCost
public float calculateCost(int strategy,
Widget reference,
java.util.Collection feasibleWidgets,
java.util.Collection factors)
- Description copied from interface:
FactoredCostCalculator
- Computes cost for a reference widget and a domain of feasible widgets
- Specified by:
calculateCost in interface FactoredCostCalculator
- 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)
- Description copied from interface:
FactoredCostCalculator
- Calculates the cost of an entire solution
- Specified by:
calculateCost in interface FactoredCostCalculator
- 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
calculateCost
protected double calculateCost(Widget root,
FactoredCostFunction costFunction)