Package net.sf.tweety.logics.cl.rules
Class EvaluateRule
- java.lang.Object
 - 
- net.sf.tweety.logics.cl.rules.RuleAdapter
 - 
- net.sf.tweety.logics.cl.rules.EvaluateRule
 
 
 
- 
- All Implemented Interfaces:
 RuleBasedCReasoner.Rule
public class EvaluateRule extends RuleAdapter
The evaluate rule tries to evaluate the kappa values by using logical constraints, therefore theKappaTermevaluate() methods are called. In fact this rule uses multiple rules, because evaluate() is implemented in a different way on the classes that implement theKappaTerminterface: - It evaluatesKappaMininstances by proofing if there is an element e which is evaluated and uses the value of this element if there is no greater or equal constraint on another element that is smaller as the value of element e. - TheKappaSuminstances are simply evaluated if every sub-element of the sum can be evaluated - TheKappaValueinstances are evaluated as soon as theirKappaMinmembers are evaluated.- Author:
 - Tim Janus
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description private java.util.Map<KappaTerm,java.lang.Integer>progressMapstores the old values of the kappa and is used to realize if some progress in calculation occured- 
Fields inherited from class net.sf.tweety.logics.cl.rules.RuleAdapter
conditionalStructure, kappas 
 - 
 
- 
Constructor Summary
Constructors Constructor Description EvaluateRule() 
- 
Method Summary
Modifier and Type Method Description booleanapply()Applies the ruleprivate booleanchangeOccurred()Updates the progressMap and also checks if a change to one kappa value is occurred sicnge the last application of this rule.voidsetKappas(java.util.Collection<KappaValue> kappas)Sets the Collection ofKappaValuethat is used as data basis for the rule- 
Methods inherited from class net.sf.tweety.logics.cl.rules.RuleAdapter
setConditonalStructure 
 - 
 
 - 
 
- 
- 
Field Detail
- 
progressMap
private java.util.Map<KappaTerm,java.lang.Integer> progressMap
stores the old values of the kappa and is used to realize if some progress in calculation occured 
 - 
 
- 
Method Detail
- 
setKappas
public void setKappas(java.util.Collection<KappaValue> kappas)
Description copied from interface:RuleBasedCReasoner.RuleSets the Collection ofKappaValuethat is used as data basis for the rule- Specified by:
 setKappasin interfaceRuleBasedCReasoner.Rule- Overrides:
 setKappasin classRuleAdapter- Parameters:
 kappas- a set of kappa values
 
- 
apply
public boolean apply()
Description copied from interface:RuleBasedCReasoner.RuleApplies the rule- Returns:
 - true if a change occured, false otherwise
 
 
- 
changeOccurred
private boolean changeOccurred()
Updates the progressMap and also checks if a change to one kappa value is occurred sicnge the last application of this rule.- Returns:
 - true if a change occured and false otherwise
 
 
 - 
 
 -