public abstract class DirectlyBelowFeature extends BinaryFeature
badSymbol
. Optionally, one can also specify that
zero should only be returned if the symbol immediately above the
focus is badSymbol
and the focus has a certain subterm index.
TODO: eliminate this class and use term features insteadModifier and Type | Field and Description |
---|---|
protected java.lang.Object |
badSymbol |
private int |
index |
TOP_COST, ZERO_COST
Modifier | Constructor and Description |
---|---|
protected |
DirectlyBelowFeature(java.lang.Object badSymbol,
int index) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
filter(RuleApp app,
PosInOccurrence pos,
Goal goal)
Compute whether the result of the feature is zero (
true )
or infinity (false ) |
protected abstract boolean |
isBadSymbol(Operator op) |
computeCost
protected DirectlyBelowFeature(java.lang.Object badSymbol, int index)
protected boolean filter(RuleApp app, PosInOccurrence pos, Goal goal)
BinaryFeature
true
)
or infinity (false
)filter
in class BinaryFeature
app
- the RuleApppos
- position where app
is to be appliedgoal
- the goal on which app
is to be appliedprotected abstract boolean isBadSymbol(Operator op)