public class ShannonTermFeature extends java.lang.Object implements TermFeature
c ? f1 : f2
, whereby the
condition c
determines whether the value of the whole
expression is f1
(if c
returns zero, or more
general if c
returns a distinguished value
trueCost
) or f2
Modifier and Type | Method and Description |
---|---|
RuleAppCost |
compute(Term term,
Services services) |
static TermFeature |
createConditionalBinary(TermFeature cond,
TermFeature thenFeature) |
static TermFeature |
createConditionalBinary(TermFeature cond,
TermFeature thenFeature,
TermFeature elseFeature) |
public RuleAppCost compute(Term term, Services services)
compute
in interface TermFeature
public static TermFeature createConditionalBinary(TermFeature cond, TermFeature thenFeature, TermFeature elseFeature)
cond
- the feature that decides which value is to be returnedthenFeature
- the value of the feature if cond
returns zeroelseFeature
- the value of the feature if cond
does not
return zerothenFeature
if cond
returns zero, the value of elseFeature
otherwisepublic static TermFeature createConditionalBinary(TermFeature cond, TermFeature thenFeature)
cond
- the feature that decides which value is to be returnedthenFeature
- the value of the feature if cond
returns zerothenFeature
if cond
returns zero, zero otherwiseCopyright © 2003-2019 The KeY-Project.