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 SummaryFields Modifier and Type Field Description private java.lang.StringtempDirectoryDirectory for temporary files.
 - 
Constructor SummaryConstructors Constructor Description SimpleMlnReasoner()
 - 
Method SummaryModifier 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.AbstractMlnReasonercomputeWeight, numberOfGroundSatisfactions, query, query
 
- 
 
- 
- 
- 
Method Detail- 
setTempDirectorypublic void setTempDirectory(java.lang.String str) Sets the path of the directory for temporary files.- Parameters:
- str- a file path
 
 - 
computeModelprivate java.io.File computeModel(MarkovLogicNetwork mln, FolSignature signature) Computes the model of the given MLN.- Parameters:
- mln- The MLN
- signature- the signature
- Returns:
- a file where the model is stored.
 
 - 
doQuerypublic double doQuery(MarkovLogicNetwork mln, FolFormula query, FolSignature signature) Description copied from class:AbstractMlnReasonerPerforms the actual querying.- Specified by:
- doQueryin class- AbstractMlnReasoner
- Parameters:
- mln- an MLN
- query- a fol formula guaranteed to be ground.
- signature- the signature
- Returns:
- the answer of the query.
 
 - 
parseInterpretationprivate 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
 
 
- 
 
-