Package net.sf.tweety.logics.cl.kappa
Class ConditionalStructureKappaBuilder
- java.lang.Object
-
- net.sf.tweety.logics.cl.kappa.ConditionalStructureKappaBuilder
-
public class ConditionalStructureKappaBuilder extends java.lang.Object
This class builds the initial kappa value list for a given conditional structure. That means it takes the conditionals of a belief base and generates the for each conditional aKappaValue
instance and also it sub instances of typeKappaMin
.- Author:
- Tim Janus
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
fastEvaluation
if this flag is true the building of the kappa minimas breaks at the first zero
-
Constructor Summary
Constructors Constructor Description ConditionalStructureKappaBuilder()
Default-Ctor: Generates a builder that does not uses fast evaluationConditionalStructureKappaBuilder(boolean fastEval)
Ctor: Generates a builder that uses fast evaluation depending on the given parameter
-
Method Summary
Modifier and Type Method Description java.util.Map<Conditional,KappaValue>
build(ConditionalStructure structure)
This builds a map of conditionals toKappaValue
instances which represent the penalty term for a falsified conditionalprivate void
buildMinima(ConditionalStructure structure, java.util.Map<Conditional,KappaValue> kappaMap, Conditional curCondition, java.util.List<NicePossibleWorld> worlds, KappaMin workingMin)
Helper method: Builds the minimums for the kappa values, a collection of worlds is given which might be either the verifiying or the falsifiying worlds and for this collection of worlds the correspondingKappaMin
is given, such that positiveMinimum is calculated using verifying worlds and negativeMinumum is using falsifying worlds.
-
-
-
Constructor Detail
-
ConditionalStructureKappaBuilder
public ConditionalStructureKappaBuilder()
Default-Ctor: Generates a builder that does not uses fast evaluation
-
ConditionalStructureKappaBuilder
public ConditionalStructureKappaBuilder(boolean fastEval)
Ctor: Generates a builder that uses fast evaluation depending on the given parameter- Parameters:
fastEval
- A flag indicating if fast evaluation shall be used (true) or not (false)
-
-
Method Detail
-
build
public java.util.Map<Conditional,KappaValue> build(ConditionalStructure structure)
This builds a map of conditionals toKappaValue
instances which represent the penalty term for a falsified conditional- Parameters:
structure
- The conditional structure that is used as basis belief base for the generation of the kappa values.- Returns:
- A map from
Conditional
instances toKappaValue
instances that represent the penalty that is given is the key conditional is falsified.
-
buildMinima
private void buildMinima(ConditionalStructure structure, java.util.Map<Conditional,KappaValue> kappaMap, Conditional curCondition, java.util.List<NicePossibleWorld> worlds, KappaMin workingMin)
Helper method: Builds the minimums for the kappa values, a collection of worlds is given which might be either the verifiying or the falsifiying worlds and for this collection of worlds the correspondingKappaMin
is given, such that positiveMinimum is calculated using verifying worlds and negativeMinumum is using falsifying worlds.- Parameters:
structure
- a conditional structurekappaMap
- a map mapping conditionals to kappa valuescurCondition
- a conditionalworlds
- a list of nice possible worldsworkingMin
- the minimal kappa
-
-