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 plan1
and plan2
, plan1.containsAll(plan2)
implies
metric.computeCost(plan1) >= metric.computeCost(plan2)
.
Modifier and Type | Method and Description |
---|---|
Optional<Comparator<com.complexible.stardog.api.update.UpdateOperation>> |
comparator()
Deprecated.
Returns a comparator that will compare two operations and order them such that operations that will yield better,
i.e.
|
double |
computeCost(RepairPlan thePlan)
Deprecated.
Returns the cost of the given plan.
|
double computeCost(RepairPlan thePlan)
Optional<Comparator<com.complexible.stardog.api.update.UpdateOperation>> comparator()
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.