public abstract class AbstractMlnReasoner extends java.lang.Object implements QuantitativeReasoner<MarkovLogicNetwork,FolFormula>
| Constructor and Description |
|---|
AbstractMlnReasoner() |
| Modifier and Type | Method and Description |
|---|---|
protected double |
computeWeight(MarkovLogicNetwork mln,
HerbrandInterpretation hInt,
FolSignature signature)
Computes the (unnormalized) weight of the given Herbrand interpretation
with respect to the formulas in this reasoner's MLN.
|
protected abstract double |
doQuery(MarkovLogicNetwork mln,
FolFormula query,
FolSignature signature)
Performs the actual querying.
|
protected int |
numberOfGroundSatisfactions(FolFormula formula,
HerbrandInterpretation hInt,
FolSignature signature)
Computes the number of instantiations of the formula, wrt.
|
java.lang.Double |
query(MarkovLogicNetwork mln,
FolFormula query)
Queries the given belief base for the given formula.
|
java.lang.Double |
query(MarkovLogicNetwork mln,
FolFormula query,
FolSignature signature)
Queries the given MLN wrt.
|
public java.lang.Double query(MarkovLogicNetwork mln, FolFormula query)
Reasonerquery in interface Reasoner<java.lang.Double,MarkovLogicNetwork,FolFormula>mln - a belief basequery - a formulapublic java.lang.Double query(MarkovLogicNetwork mln, FolFormula query, FolSignature signature)
mln - some mlnquery - some querysignature - some signatureprotected double computeWeight(MarkovLogicNetwork mln, HerbrandInterpretation hInt, FolSignature signature)
mln - an MLNhInt - a Herbrand interpretationsignature - the underlying signatureprotected int numberOfGroundSatisfactions(FolFormula formula, HerbrandInterpretation hInt, FolSignature signature)
formula - some fol formula.hInt - a Herbrand interpretation.signature - the underlying signatureprotected abstract double doQuery(MarkovLogicNetwork mln, FolFormula query, FolSignature signature)
mln - an MLNquery - a fol formula guaranteed to be ground.