Class IteratingMlnReasoner
- java.lang.Object
-
- net.sf.tweety.logics.mln.reasoner.AbstractMlnReasoner
-
- net.sf.tweety.logics.mln.reasoner.IteratingMlnReasoner
-
- All Implemented Interfaces:
net.sf.tweety.commons.QuantitativeReasoner<MarkovLogicNetwork,net.sf.tweety.logics.fol.syntax.FolFormula>,net.sf.tweety.commons.Reasoner<Double,MarkovLogicNetwork,net.sf.tweety.logics.fol.syntax.FolFormula>
public class IteratingMlnReasoner extends AbstractMlnReasoner
This MLN reasoner takes another MLN reasoner and performs several iterations with this one and takes the average result as result.- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description IteratingMlnReasoner(AbstractMlnReasoner reasoner, long numberOfIterations)Creates a new IteratingMlnReasoner for the given MLN reaasoner.
-
Method Summary
Modifier and Type Method Description protected doubledoQuery(MarkovLogicNetwork mln, net.sf.tweety.logics.fol.syntax.FolFormula query, net.sf.tweety.logics.fol.syntax.FolSignature signature)Performs the actual querying.-
Methods inherited from class net.sf.tweety.logics.mln.reasoner.AbstractMlnReasoner
computeWeight, numberOfGroundSatisfactions, query, query
-
-
-
-
Constructor Detail
-
IteratingMlnReasoner
public IteratingMlnReasoner(AbstractMlnReasoner reasoner, long numberOfIterations)
Creates a new IteratingMlnReasoner for the given MLN reaasoner.- Parameters:
reasoner- some MLN reasoner.numberOfIterations- the number of iterations for the reasoner
-
-
Method Detail
-
doQuery
protected double doQuery(MarkovLogicNetwork mln, net.sf.tweety.logics.fol.syntax.FolFormula query, net.sf.tweety.logics.fol.syntax.FolSignature signature)
Description copied from class:AbstractMlnReasonerPerforms the actual querying.- Specified by:
doQueryin classAbstractMlnReasoner- Parameters:
mln- an MLNquery- a fol formula guaranteed to be ground.signature- the signature- Returns:
- the answer of the query.
-
-