Class IteratingMlnReasoner
- java.lang.Object
-
- net.sf.tweety.logics.mln.reasoner.AbstractMlnReasoner
-
- net.sf.tweety.logics.mln.reasoner.IteratingMlnReasoner
-
- All Implemented Interfaces:
QuantitativeReasoner<MarkovLogicNetwork,FolFormula>
,Reasoner<java.lang.Double,MarkovLogicNetwork,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
-
-
Field Summary
Fields Modifier and Type Field Description private long
numberOfIterations
The number of iterations.private AbstractMlnReasoner
reasoner
The reasoner inside this reasoner.
-
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 double
doQuery(MarkovLogicNetwork mln, FolFormula query, FolSignature signature)
Performs the actual querying.-
Methods inherited from class net.sf.tweety.logics.mln.reasoner.AbstractMlnReasoner
computeWeight, numberOfGroundSatisfactions, query, query
-
-
-
-
Field Detail
-
reasoner
private AbstractMlnReasoner reasoner
The reasoner inside this reasoner.
-
numberOfIterations
private long numberOfIterations
The number of iterations.
-
-
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, FolFormula query, FolSignature signature)
Description copied from class:AbstractMlnReasoner
Performs the actual querying.- Specified by:
doQuery
in classAbstractMlnReasoner
- Parameters:
mln
- an MLNquery
- a fol formula guaranteed to be ground.signature
- the signature- Returns:
- the answer of the query.
-
-