public class DeleteMergePointRuleFeature extends java.lang.Object implements Feature
DeleteMergePointRule
; incredibly cheap if the previous
rule application was a MergeRule
app, infinitely expensive otherwise.
The alternative would be to always check whether there's another Goal
around with the same MergePointStatement
(then we may not delete),
which is much more time intensive.Modifier | Constructor and Description |
---|---|
private |
DeleteMergePointRuleFeature() |
Modifier and Type | Method and Description |
---|---|
RuleAppCost |
computeCost(RuleApp app,
PosInOccurrence pos,
Goal goal)
Evaluate the cost of a
RuleApp . |
public static final Feature INSTANCE
public RuleAppCost computeCost(RuleApp app, PosInOccurrence pos, Goal goal)
Feature
RuleApp
.computeCost
in interface Feature
app
- the RuleApppos
- position where app
is to be appliedgoal
- the goal on which app
is to be appliedRuleAppCost
object. TopRuleAppCost.INSTANCE
indicates that the rule shall not be applied at all (it is discarded by
the strategy).