Class SimpleMlnReasoner
- java.lang.Object
-
- net.sf.tweety.logics.mln.reasoner.AbstractMlnReasoner
-
- net.sf.tweety.logics.mln.reasoner.SimpleMlnReasoner
-
- All Implemented Interfaces:
QuantitativeReasoner<MarkovLogicNetwork,FolFormula>,Reasoner<java.lang.Double,MarkovLogicNetwork,FolFormula>
public class SimpleMlnReasoner extends AbstractMlnReasoner
- Author:
- mthimm
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringtempDirectoryDirectory for temporary files.
-
Constructor Summary
Constructors Constructor Description SimpleMlnReasoner()
-
Method Summary
Modifier and Type Method Description private java.io.FilecomputeModel(MarkovLogicNetwork mln, FolSignature signature)Computes the model of the given MLN.doubledoQuery(MarkovLogicNetwork mln, FolFormula query, FolSignature signature)Performs the actual querying.private HerbrandInterpretationparseInterpretation(java.lang.String str, FolSignature signature)Constructs a Herbrand interpretation from the given stringvoidsetTempDirectory(java.lang.String str)Sets the path of the directory for temporary files.-
Methods inherited from class net.sf.tweety.logics.mln.reasoner.AbstractMlnReasoner
computeWeight, numberOfGroundSatisfactions, query, query
-
-
-
-
Method Detail
-
setTempDirectory
public void setTempDirectory(java.lang.String str)
Sets the path of the directory for temporary files.- Parameters:
str- a file path
-
computeModel
private java.io.File computeModel(MarkovLogicNetwork mln, FolSignature signature)
Computes the model of the given MLN.- Parameters:
mln- The MLNsignature- the signature- Returns:
- a file where the model is stored.
-
doQuery
public double doQuery(MarkovLogicNetwork mln, FolFormula query, 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.
-
parseInterpretation
private HerbrandInterpretation parseInterpretation(java.lang.String str, FolSignature signature)
Constructs a Herbrand interpretation from the given string- Parameters:
str- a string.signature- the signature- Returns:
- a Herbrand interpretation
-
-