Class RpclMeReasoner
- java.lang.Object
-
- net.sf.tweety.logics.rpcl.reasoner.RpclMeReasoner
-
- All Implemented Interfaces:
ModelProvider<RelationalProbabilisticConditional,RpclBeliefSet,RpclProbabilityDistribution<?>>
,QuantitativeReasoner<RpclBeliefSet,FolFormula>
,Reasoner<java.lang.Double,RpclBeliefSet,FolFormula>
public class RpclMeReasoner extends java.lang.Object implements QuantitativeReasoner<RpclBeliefSet,FolFormula>, ModelProvider<RelationalProbabilisticConditional,RpclBeliefSet,RpclProbabilityDistribution<?>>
General ME-reasoner for RPCL.- Author:
- Matthias Thimm
-
-
Field Summary
Fields Modifier and Type Field Description static int
LIFTED_INFERENCE
Integer constant for lifted inference.static int
STANDARD_INFERENCE
Integer constant for standard inference.
-
Constructor Summary
Constructors Constructor Description RpclMeReasoner(RpclSemantics semantics)
Creates a new reasoner.RpclMeReasoner(RpclSemantics semantics, int inferenceType)
Creates a new reasoner.
-
Method Summary
Modifier and Type Method Description int
getInferenceType()
Returns the inference type of this reasoner, i.e.RpclProbabilityDistribution<?>
getModel(RpclBeliefSet bbase)
Returns a single (dedicated) model of the given belief base.RpclProbabilityDistribution<?>
getModel(RpclBeliefSet kb, FolSignature signature)
Determines the ME distribution of the given knowlege base wrt.java.util.Collection<RpclProbabilityDistribution<?>>
getModels(RpclBeliefSet bbase)
Returns a characterizing model of the given belief basejava.lang.Double
query(RpclBeliefSet beliefbase, FolFormula formula)
Queries the given belief base for the given formula.java.lang.Double
query(RpclBeliefSet beliefbase, FolFormula query, FolSignature signature)
Queries the knowledge base wrt.
-
-
-
Field Detail
-
STANDARD_INFERENCE
public static final int STANDARD_INFERENCE
Integer constant for standard inference.- See Also:
- Constant Field Values
-
LIFTED_INFERENCE
public static final int LIFTED_INFERENCE
Integer constant for lifted inference.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RpclMeReasoner
public RpclMeReasoner(RpclSemantics semantics, int inferenceType)
Creates a new reasoner.- Parameters:
semantics
- the semantics for this reasoner.inferenceType
- one of RpclMeReasoner.STANDARD_INFERENCE or RpclMeReasoner.LIFTED_INFERENCE
-
RpclMeReasoner
public RpclMeReasoner(RpclSemantics semantics)
Creates a new reasoner.- Parameters:
semantics
- the semantics for this reasoner.
-
-
Method Detail
-
getInferenceType
public int getInferenceType()
Returns the inference type of this reasoner, i.e. one of RpclMeReasoner.STANDARD_INFERENCE or RpclMeReasoner.LIFTED_INFERENCE- Returns:
- the inference type of this reasoner.
-
query
public java.lang.Double query(RpclBeliefSet beliefbase, FolFormula query, FolSignature signature)
Queries the knowledge base wrt. the given signature.- Parameters:
beliefbase
- some knowledge basequery
- some querysignature
- some signature.- Returns:
- the answer to the query
-
query
public java.lang.Double query(RpclBeliefSet beliefbase, FolFormula formula)
Description copied from interface:Reasoner
Queries the given belief base for the given formula.- Specified by:
query
in interfaceReasoner<java.lang.Double,RpclBeliefSet,FolFormula>
- Parameters:
beliefbase
- a belief baseformula
- a formula- Returns:
- the answer to the query
-
getModels
public java.util.Collection<RpclProbabilityDistribution<?>> getModels(RpclBeliefSet bbase)
Description copied from interface:ModelProvider
Returns a characterizing model of the given belief base- Specified by:
getModels
in interfaceModelProvider<RelationalProbabilisticConditional,RpclBeliefSet,RpclProbabilityDistribution<?>>
- Parameters:
bbase
- some belief base- Returns:
- the (selected) models of the belief base
-
getModel
public RpclProbabilityDistribution<?> getModel(RpclBeliefSet bbase)
Description copied from interface:ModelProvider
Returns a single (dedicated) model of the given belief base. If the implemented method allows for more than one dedicated model, the selection may be non-deterministic.- Specified by:
getModel
in interfaceModelProvider<RelationalProbabilisticConditional,RpclBeliefSet,RpclProbabilityDistribution<?>>
- Parameters:
bbase
- some belief base- Returns:
- a selected model of the belief base.
-
getModel
public RpclProbabilityDistribution<?> getModel(RpclBeliefSet kb, FolSignature signature)
Determines the ME distribution of the given knowlege base wrt. the given signature.- Parameters:
kb
- an RPCL knowledge basesignature
- some signature- Returns:
- the ME distribution of the knowledge base
-
-