| Modifier and Type | Field and Description |
|---|---|
private boolean |
demandInst |
private RuleAppCost |
noInstCost |
private ProjectionToTerm |
proj |
private TermFeature |
termFeature |
| Modifier | Constructor and Description |
|---|---|
private |
ApplyTFFeature(ProjectionToTerm proj,
TermFeature termFeature,
RuleAppCost noInstCost,
boolean demandInst) |
| Modifier and Type | Method and Description |
|---|---|
RuleAppCost |
computeCost(RuleApp app,
PosInOccurrence pos,
Goal goal)
Evaluate the cost of a
RuleApp. |
static Feature |
create(ProjectionToTerm proj,
TermFeature tf) |
static Feature |
createNonStrict(ProjectionToTerm proj,
TermFeature tf,
RuleAppCost noInstCost) |
private final ProjectionToTerm proj
private final TermFeature termFeature
private final RuleAppCost noInstCost
private final boolean demandInst
private ApplyTFFeature(ProjectionToTerm proj, TermFeature termFeature, RuleAppCost noInstCost, boolean demandInst)
proj - the ProjectionToTerm to the instantiation is supposed to be
inspectedtermFeature - the term feature to usenoInstCost - result if schemaVar is not instantiateddemandInst - if true then raise an exception if
schemaVar is not instantiated (otherwise:
return noInstCost)public static Feature createNonStrict(ProjectionToTerm proj, TermFeature tf, RuleAppCost noInstCost)
public static Feature create(ProjectionToTerm proj, TermFeature tf)
public RuleAppCost computeCost(RuleApp app, PosInOccurrence pos, Goal goal)
FeatureRuleApp.computeCost in interface Featureapp - 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).