public interface RepairPlanMetric
Cost metric for repair plans. The cost metric has two purposes: 1) Compute the cost for a given plan so two plans can be compared. 2) Compare the operations such that an action that will yield a better plan for this metric can be selected. The plans evaluated by a metric may not be complete
Cost metrics should be monotonic; that is adding a new operation to an existing plan should never decrease its cost.
More formally, for two plans
metric.computeCost(plan1) >= metric.computeCost(plan2).
|Modifier and Type||Method and Description|
Returns a comparator that will compare two operations and order them such that operations that will yield better, i.e.
Returns the cost of the given plan.
double computeCost(RepairPlan thePlan)
Returns a comparator that will compare two operations and order them such that operations that will yield better, i.e. smaller cost, plans with respect to this metric will be less than operations that will yield worse, i.e. higher cost, plans.
This comparator is optional. This function may return an
empty value or the
comparisons it performs for operations may not be consistent with the costs for containing these operations. In
either case, the plans will be computed correctly and the optimal plans will be found. A more accurate operation
comparator will speed up the planning process as better plans can be found sooner but the exact same plans will
be found with a missing or inaccurate comparator too.
Copyright © 2010-2016 Stardog Union. All Rights Reserved.