Package net.sf.tweety.logics.cl.kappa
Class KappaValue
- java.lang.Object
-
- net.sf.tweety.logics.cl.kappa.KappaValue
-
- All Implemented Interfaces:
KappaTerm
public class KappaValue extends java.lang.Object implements KappaTerm
Represents a Kappa-Value for the c-revision, it contains twoKappaMin
instances, bothKappaValue
andKappaMin
implement theKappaTerm
interface. Internally the value of the Kappa is represented using an integer and as long as the Kappa cannot be evaluated correctly its value member is -1.- Author:
- Tim Janus
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Conditional
cond
The Conditional that generates this kappa value(package private) boolean
evaluateProcessing
A flag used to store if this kappa-value is evaluating its value(package private) int
index
the index of the kappa, used to differentiate the several kappa values of a c-representation(package private) KappaMin
negativeMinimum
This minimum contains those kappa sums of conditionals that are falsified in a world, that is also falsified by theConditional
of this kappa value.(package private) KappaMin
positiveMinimum
This minimum contains those kappa sums of conditionals that are falsified in a world, that is verified by theConditional
of this kappa value.(package private) static boolean
subtermsProcessing
A flag used to store if this kappa-value is processing its sub-terms(package private) int
value
the current value of the kappa, whereby -1 means it is not evaluated yet
-
Constructor Summary
Constructors Constructor Description KappaValue(int index, Conditional cond)
Ctor: Generates a kappa value for the givenConditional
with the given index.
-
Method Summary
Modifier and Type Method Description boolean
evaluate()
Tries to evaluate the kappa term, if the evaluation is successful then the next call of value returns the evaluated value.java.lang.String
fullString()
java.util.Set<KappaTerm>
getSubTerms()
Processes all the sub-termsint
greaterEqualThan()
java.lang.String
toString()
int
value()
-
-
-
Field Detail
-
index
int index
the index of the kappa, used to differentiate the several kappa values of a c-representation
-
value
int value
the current value of the kappa, whereby -1 means it is not evaluated yet
-
positiveMinimum
KappaMin positiveMinimum
This minimum contains those kappa sums of conditionals that are falsified in a world, that is verified by theConditional
of this kappa value.
-
negativeMinimum
KappaMin negativeMinimum
This minimum contains those kappa sums of conditionals that are falsified in a world, that is also falsified by theConditional
of this kappa value.
-
cond
Conditional cond
The Conditional that generates this kappa value
-
evaluateProcessing
boolean evaluateProcessing
A flag used to store if this kappa-value is evaluating its value
-
subtermsProcessing
static boolean subtermsProcessing
A flag used to store if this kappa-value is processing its sub-terms
-
-
Constructor Detail
-
KappaValue
public KappaValue(int index, Conditional cond)
Ctor: Generates a kappa value for the givenConditional
with the given index.- Parameters:
index
- an intcond
- some conditional
-
-
Method Detail
-
evaluate
public boolean evaluate()
Description copied from interface:KappaTerm
Tries to evaluate the kappa term, if the evaluation is successful then the next call of value returns the evaluated value.
-
value
public int value()
-
greaterEqualThan
public int greaterEqualThan()
- Specified by:
greaterEqualThan
in interfaceKappaTerm
- Returns:
- The minimum value of this kappa term, such that the caller knows the kappa term is greater or equal the returned value.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
fullString
public java.lang.String fullString()
-
getSubTerms
public java.util.Set<KappaTerm> getSubTerms()
Description copied from interface:KappaTerm
Processes all the sub-terms- Specified by:
getSubTerms
in interfaceKappaTerm
- Returns:
- A set containing all the sub-terms of the kappa term
-
-